lomas_server.tests package
Submodules
lomas_server.tests.constants module
lomas_server.tests.test_api module
- class lomas_server.tests.test_api.TestRootAPIEndpoint(methodName='runTest')[source]
Bases:
TestCase
End-to-end tests of the api endpoints.
This test can be both executed as an integration test (enabled by setting LOMAS_TEST_MONGO_INTEGRATION to True), or a standard test. The first requires a mongodb to be started before running while the latter will use a local YamlDatabase.
- classmethod setUpClass() None [source]
Hook method for setting up class fixture before running tests in the class.
lomas_server.tests.test_api_diffprivlib module
- class lomas_server.tests.test_api_diffprivlib.TestDiffPrivLibEndpoint(methodName='runTest')[source]
Bases:
TestRootAPIEndpoint
Test DiffPrivLib Endpoint with different models
lomas_server.tests.test_api_smartnoise_synth module
- class lomas_server.tests.test_api_smartnoise_synth.TestSmartnoiseSynthEndpoint(methodName='runTest')[source]
Bases:
TestRootAPIEndpoint
Test Smartnoise Synth Endpoints with different Synthesizers
- test_smartnoise_synth_query_datetime() None [source]
Test smartnoise synth query on other dataset for datetime columns
- test_smartnoise_synth_query_delta_none() None [source]
Test smartnoise synth query on other synthesizer with delta None
- test_smartnoise_synth_query_pacsynth() None [source]
Test smartnoise synth query PAC-Synth Synthesizer TOO UNSTABLE BECAUSE OF RUST PANIC
- test_smartnoise_synth_query_patectgan() None [source]
Test smartnoise synth query PATE-CTGAN Synthesizer
- test_smartnoise_synth_query_pategan() None [source]
Test smartnoise synth query pategan Synthesizer
lomas_server.tests.test_collection_models module
lomas_server.tests.test_dummy_generation module
lomas_server.tests.test_mongodb_admin module
- class lomas_server.tests.test_mongodb_admin.TestMongoDBAdmin(methodName='runTest')[source]
Bases:
TestCase
Tests for the functions in mongodb_admin.py.
This is an integration test and requires a mongodb database to be started before being executed.
The test is only executed if the LOMAS_TEST_MONGO_INTEGRATION environment variable is set to True.
lomas_server.tests.test_mongodb_admin_cli module
- class lomas_server.tests.test_mongodb_admin_cli.TestMongoDBAdmin(methodName='runTest')[source]
Bases:
TestCase
Tests for the functions in mongodb_admin.py.
This is an integration test and requires a mongodb database to be started before being executed.
The test is only executed if the LOMAS_TEST_MONGO_INTEGRATION environment variable is set to True.
- run_cli_command(command: str, args: List) None [source]
Run a MongoDB administration CLI command.
- Parameters:
command (str) – The subcommand to run.
args (List[str]) – A list of arguments for the subcommand.
- Raises:
ValueError – If the command returns a non-zero exit status.
- test_get_archives_of_user_cli() None [source]
Test show archives of user via CLI Does not verify output for not
- test_get_list_of_datasets_cli() None [source]
Test get list of datasets via CLI Does not verify output for not
- test_get_list_of_datasets_from_user_cli() None [source]
Test get list of users via CLI Does not verify output for not
- test_get_list_of_users_cli() None [source]
Test get list of users via CLI Does not verify output for not