testing script with examples
Test suite containing functional unit tests of exported functions. Click on a [source] link beside any test method to view the examples found in that particular test.
- class TestKeys[source]
Bases:
TestCaseTests of methods of cryptographic key classes.
- test_key_operations_for_store()[source]
Test key generate, dump, JSONify, and load for the store operation.
- test_key_operations_for_match()[source]
Test key generate, dump, JSONify, and load methods for the match operation.
- test_key_operations_for_sum_with_single_node()[source]
Test key generate, dump, JSONify, and load methods for the sum operation with a single node.
- test_key_operations_for_sum_with_multiple_nodes()[source]
Test key generate, dump, JSONify, and load methods for the sum operation with multiple (without/with threshold) nodes.
- test_secret_key_from_seed_for_store()[source]
Test key generation from seed for the store operation both with a single node and multiple (without/with threshold) nodes.
- class TestKeysError[source]
Bases:
TestCaseTests of errors raised by methods of cryptographic key classes.
- class TestFunctions[source]
Bases:
TestCaseTests of the functional and algebraic properties of encryption/decryption functions.
- test_encrypt_decrypt_for_store()[source]
Test encryption and decryption for the store operation with single/multiple nodes and without/with threshold (including subcluster combinations).
- class TestRepresentations[source]
Bases:
TestCaseTests the portability and compatibility of key and ciphertext representations.
- test_representations_for_store_with_single_node()[source]
Confirm ability to handle representation of keys and ciphertexts for storage in a single-node cluster.
- test_representations_for_store_with_multiple_nodes()[source]
Confirm ability to handle representation of keys and ciphertexts for storage in a multiple-node cluster.
- test_representations_for_store_with_multiple_nodes_with_threshold()[source]
Confirm ability to handle representation of keys and ciphertexts for storage (with threshold) in a multiple-node cluster.
- test_representations_for_sum_with_single_node()[source]
Confirm ability to handle representation of keys and ciphertexts for summation (with threshold) in a single-node cluster.
- class TestCiphertextSizes[source]
Bases:
TestCaseTests that ciphertext sizes conform to known closed formulas.
- test_ciphertext_sizes_for_store()[source]
Confirm that ciphertexts compatible with the storage operation have the expected sizes.
- class TestFunctionsErrors[source]
Bases:
TestCaseTests verifying that encryption/decryption methods return expected errors.
- test_decrypt_errors_invalid_key()[source]
Test errors that can occur during decryption with an invalid key.
- class TestSecureComputations[source]
Bases:
TestCaseTests consisting of end-to-end workflows involving secure computation.
- test_workflow_for_secure_sum_mul_with_single_node()[source]
Test secure summation workflow with a cluster that has a single node.