lomas_server.tests package
Submodules
lomas_server.tests.constants module
lomas_server.tests.test_api module
lomas_server.tests.test_api_diffprivlib module
- class lomas_server.tests.test_api_diffprivlib.TestDiffPrivLibEndpoint(methodName='runTest')[source]
Bases:
TestSetupRootAPIEndpoint
Test DiffPrivLib Endpoint with different models.
- lomas_server.tests.test_api_diffprivlib.validate_pipeline(client, response) QueryResponse [source]
Validate that the pipeline ran successfully.
Returns a model and a score.
lomas_server.tests.test_api_smartnoise_synth module
- class lomas_server.tests.test_api_smartnoise_synth.TestSmartnoiseSynthEndpoint(methodName='runTest')[source]
Bases:
TestSetupRootAPIEndpoint
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_api_smartnoise_synth.validate_response(client, response, headers=None) QueryResponse [source]
Validate that the pipeline ran successfully.
Returns a model and a score.
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.
- update_dataset_paths(dataset: dict) dict [source]
Update dataset paths with prefix.
Helper function that takes a dataset yaml, parses it and updates all the file paths with the prefix to the test data directory.
- Parameters:
dataset (dict) – Dataset yaml.
- Returns:
Dataset yaml with updated paths.
- Return type:
dict