toil.test.server.serverTest¶
Attributes¶
Classes¶
A common base class for Toil tests. |
|
Tests for the utility functions used by the Toil server. |
|
Test file-based state storage. |
|
Test file-based state storage using URLs instead of local paths. |
|
Base class for tests that need a bucket. |
|
Test AWS-based state storage. |
|
Class for server tests that provides a self.app in testing mode. |
|
Tests for Toil's Workflow Execution Service API that don't run workflows. |
|
Tests of the WES server running workflows. |
|
End-to-end workflow-running tests against Celery. |
|
Test the server with Celery and state stored in S3. |
Functions¶
|
Use as a decorator before test classes or methods to run only if AWS S3 is usable. |
|
Use as a decorator before test classes or methods to run only if RabbitMQ is set up to take Celery jobs. |
|
Use as a decorator before test classes or methods to only run them if Connexion is installed. |
Module Contents¶
- class toil.test.server.serverTest.ToilTest(methodName='runTest')[source]¶
Bases:
unittest.TestCaseA common base class for Toil tests.
Please have every test case directly or indirectly inherit this one.
When running tests you may optionally set the TOIL_TEST_TEMP environment variable to the path of a directory where you want temporary test files be placed. The directory will be created if it doesn’t exist. The path may be relative in which case it will be assumed to be relative to the project root. If TOIL_TEST_TEMP is not defined, temporary files and directories will be created in the system’s default location for such files and any temporary files or directories left over from tests will be removed automatically removed during tear down. Otherwise, left-over files will not be removed.
- classmethod setUpClass()[source]¶
Hook method for setting up class fixture before running tests in the class.
- Return type:
None
- classmethod tearDownClass()[source]¶
Hook method for deconstructing the class fixture after running all tests in the class.
- Return type:
None
- setUp()[source]¶
Hook method for setting up the test fixture before exercising it.
- Return type:
None
- toil.test.server.serverTest.needs_aws_s3(test_item)[source]¶
Use as a decorator before test classes or methods to run only if AWS S3 is usable.
- Parameters:
test_item (MT)
- Return type:
MT
- toil.test.server.serverTest.needs_celery_broker(test_item)[source]¶
Use as a decorator before test classes or methods to run only if RabbitMQ is set up to take Celery jobs.
- Parameters:
test_item (MT)
- Return type:
MT
- toil.test.server.serverTest.needs_server(test_item)[source]¶
Use as a decorator before test classes or methods to only run them if Connexion is installed.
- Parameters:
test_item (MT)
- Return type:
MT
- toil.test.server.serverTest.logger¶
- class toil.test.server.serverTest.ToilServerUtilsTest(methodName='runTest')[source]¶
Bases:
toil.test.ToilTestTests for the utility functions used by the Toil server.
Bases:
toil.test.ToilTestBasic tests for state stores.
Make a state store to test, on a single fixed URL.
- Return type:
Make sure that the state store under test can store and load keys.
- Return type:
None
- class toil.test.server.serverTest.FileStateStoreTest(methodName='runTest')[source]¶
Bases:
hiddenTest file-based state storage.
- setUp()[source]¶
Hook method for setting up the test fixture before exercising it.
- Return type:
None
- class toil.test.server.serverTest.FileStateStoreURLTest(methodName='runTest')[source]¶
Bases:
hiddenTest file-based state storage using URLs instead of local paths.
- setUp()[source]¶
Hook method for setting up the test fixture before exercising it.
- Return type:
None
- class toil.test.server.serverTest.BucketUsingTest(methodName='runTest')[source]¶
Bases:
toil.test.ToilTestBase class for tests that need a bucket.
- class toil.test.server.serverTest.AWSStateStoreTest(methodName='runTest')[source]¶
Bases:
hidden,BucketUsingTestTest AWS-based state storage.
- bucket_path = 'prefix/of/keys'¶
- class toil.test.server.serverTest.AbstractToilWESServerTest(*args, **kwargs)[source]¶
Bases:
toil.test.ToilTestClass for server tests that provides a self.app in testing mode.
- class toil.test.server.serverTest.ToilWESServerBenchTest(*args, **kwargs)[source]¶
Bases:
AbstractToilWESServerTestTests for Toil’s Workflow Execution Service API that don’t run workflows.
- class toil.test.server.serverTest.ToilWESServerWorkflowTest(*args, **kwargs)[source]¶
Bases:
AbstractToilWESServerTestTests of the WES server running workflows.
- run_zip_workflow(zip_path, include_message=True, include_params=True)[source]¶
We have several zip file tests; this submits a zip file and makes sure it ran OK.
If include_message is set to False, don’t send a “message” argument in workflow_params. If include_params is also set to False, don’t send workflow_params at all.
- test_run_workflow_relative_url_no_attachments_fails()[source]¶
Test run example CWL workflow from relative workflow URL but with no attachments.
- Return type:
None
- test_run_workflow_relative_url()[source]¶
Test run example CWL workflow from relative workflow URL.
- Return type:
None
- test_run_workflow_https_url()[source]¶
Test run example CWL workflow from the Internet.
- Return type:
None
- test_run_workflow_single_file_zip()[source]¶
Test run example CWL workflow from single-file ZIP.
- Return type:
None
- test_run_workflow_multi_file_zip()[source]¶
Test run example CWL workflow from multi-file ZIP.
- Return type:
None
- test_run_workflow_manifest_zip()[source]¶
Test run example CWL workflow from ZIP with manifest.
- Return type:
None
- test_run_workflow_inputs_zip()[source]¶
Test run example CWL workflow from ZIP without manifest but with inputs.
- Return type:
None
- test_run_workflow_manifest_and_inputs_zip()[source]¶
Test run example CWL workflow from ZIP with manifest and inputs.
- Return type:
None
- class toil.test.server.serverTest.ToilWESServerCeleryWorkflowTest(*args, **kwargs)[source]¶
Bases:
ToilWESServerWorkflowTestEnd-to-end workflow-running tests against Celery.
- class toil.test.server.serverTest.ToilWESServerCeleryS3StateWorkflowTest(*args, **kwargs)[source]¶
Bases:
ToilWESServerWorkflowTest,BucketUsingTestTest the server with Celery and state stored in S3.