keystone.tests.unit.receipt package

Submodules

keystone.tests.unit.receipt.test_fernet_provider module

class keystone.tests.unit.receipt.test_fernet_provider.TestFernetKeyRotation(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.TestCase

assertRepositoryState(expected_size)[source]

Validate the state of the key repository.

assertUniqueRepositoryState()[source]

Ensure that the current key repo state has not been seen before.

property key_repository_signature

Create a “thumbprint” of the current key repository.

Because key files are renamed, this produces a hash of the contents of the key files, ignoring their filenames.

The resulting signature can be used, for example, to ensure that you have a unique set of keys after you perform a key rotation (taking a static set of keys, and simply shuffling them, would fail such a test).

property key_repository_size

The number of keys in the key repository.

property keys

Key files converted to numbers.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_non_numeric_files()[source]
test_rotation()[source]
test_rotation_disk_write_fail()[source]
test_rotation_empty_file()[source]
class keystone.tests.unit.receipt.test_fernet_provider.TestFernetReceiptProvider(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_invalid_receipt_raises_receipt_not_found()[source]
class keystone.tests.unit.receipt.test_fernet_provider.TestLoadKeys(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.TestCase

assertValidFernetKeys(keys)[source]
test_empty_files()[source]
test_non_numeric_files()[source]
class keystone.tests.unit.receipt.test_fernet_provider.TestPayloads(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.TestCase

assertTimestampsEqual(expected, actual)[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_payload()[source]
test_payload_multiple_methods()[source]
test_strings_can_be_converted_to_bytes()[source]
test_time_string_to_float_conversions()[source]
test_uuid_hex_to_byte_conversions()[source]
class keystone.tests.unit.receipt.test_fernet_provider.TestReceiptFormatter(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.TestCase

test_restore_padding()[source]
class keystone.tests.unit.receipt.test_fernet_provider.TestValidate(*args, **kwargs)[source]

Bases: keystone.tests.unit.core.TestCase

config_overrides()[source]
setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_validate_v3_receipt_simple()[source]
test_validate_v3_receipt_validation_error_exc()[source]

keystone.tests.unit.receipt.test_receipt_serialization module

class keystone.tests.unit.receipt.test_receipt_serialization.TestReceiptSerialization(*args, **kwargs)[source]

Bases: keystone.tests.unit.base_classes.TestCaseWithBootstrap

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_error_handling_in_deserialize(handler_mock)[source]
test_serialize_and_deserialize_receipt_model()[source]

Module contents