toil.test.lib.aws.test_utils

Attributes

logger

Classes

ToilTest

A common base class for Toil tests.

TagGenerationTest

Test for tag generation from environment variables

Functions

build_tag_dict_from_env([environment])

Module Contents

toil.test.lib.aws.test_utils.build_tag_dict_from_env(environment=os.environ)
Parameters:

environment (MutableMapping[str, str])

Return type:

Dict[str, str]

class toil.test.lib.aws.test_utils.ToilTest(methodName='runTest')

Bases: unittest.TestCase

A 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.

setup_method(method)
Parameters:

method (Any)

Return type:

None

classmethod setUpClass()

Hook method for setting up class fixture before running tests in the class.

Return type:

None

classmethod tearDownClass()

Hook method for deconstructing the class fixture after running all tests in the class.

Return type:

None

setUp()

Hook method for setting up the test fixture before exercising it.

Return type:

None

tearDown()

Hook method for deconstructing the test fixture after testing it.

Return type:

None

classmethod awsRegion()

Pick an appropriate AWS region.

Use us-west-2 unless running on EC2, in which case use the region in which the instance is located

Return type:

str

toil.test.lib.aws.test_utils.logger
class toil.test.lib.aws.test_utils.TagGenerationTest(methodName='runTest')

Bases: toil.test.ToilTest

Test for tag generation from environment variables

test_build_tag()
test_empty_aws_tags()
test_incorrect_json_object()
test_incorrect_json_emoji()
test_build_tag_with_tags()