schrodinger.application.models.test.client_contract module¶
Test contract for AbstractLibraryClient implementations.
This module provides a test contract that can be used to verify that concrete implementations of AbstractLibraryClient properly implement the interface.
- schrodinger.application.models.test.client_contract.make_definition(definition_id='def123')¶
- schrodinger.application.models.test.client_contract.make_configuration(config_id='config123', definition_id='def123')¶
- schrodinger.application.models.test.client_contract.make_def_and_config(config_id='config123', definition_id='def123')¶
- class schrodinger.application.models.test.client_contract.LibraryClientContract¶
Bases:
objectShared behavioral contract for library clients.
Supported v2 clients use the default v2 fixtures. Explicit legacy clients may override the fixture factories while sharing backend-neutral behavior. Subclasses must implement
make_client()and any necessary cleanup inteardown_method().- make_definition(definition_id: str = 'def123') ModelDefinition¶
- make_configuration(config_id: str = 'config123', definition_id: str = 'def123') ModelConfiguration¶
- make_def_and_config(config_id: str = 'config123', definition_id: str = 'def123') tuple[ModelDefinition, ModelConfiguration]¶
- make_def_and_config_with_file(file_path: str, config_id: str = 'config123', definition_id: str = 'def123') tuple[ModelDefinition, ModelConfiguration]¶
- make_client() AbstractLibraryClient¶
- setup_method()¶
- test_write_ops_do_not_mutate_input()¶
createDefinition/createConfiguration/updateDefinition/updateConfiguration must leave the caller’s input object unchanged. The populated model is returned instead.
- test_createDefinition()¶
- test_updateDefinition()¶
- test_getDefinition()¶
- test_createConfiguration()¶
- test_getConfiguration()¶
- test_updateConfiguration()¶
- test_getAllDefinitionIds()¶
- test_getAllConfigurationIds()¶
- test_getDefinitionVersions()¶
- test_getConfigurationVersions()¶
- test_createExecutionRecord()¶
- test_getAllExecutionRecordIds()¶
- test_getCurrentUser()¶
- test_getDefinitions()¶
- test_getConfigurations()¶
- test_deleteDefinition()¶
- test_deleteDefinition_removes_all_versions()¶
- test_deleteConfiguration()¶
- test_deleteConfiguration_removes_all_versions()¶
- test_createExecutionRecord_with_output_files()¶
Test that output files get IDs assigned during storage.
- test_resolveStoredFiles()¶
Stored file IDs are resolved to local file paths.
- test_downloadStoredFile()¶
Test downloading a stored file to a destination path.