tests.manager_tests package

Submodules

tests.manager_tests.mock_utils module

Utilities for mocking out AWS handlers

tests.manager_tests.mock_utils.mock_db_handler(data, keyname)[source]
Parameters:
  • data (dict) – dict from keys to data
  • keyname (string) –
tests.manager_tests.mock_utils.mock_gogs_handler(tokens)[source]
Parameters:tokens – collection of valid user tokens
tests.manager_tests.mock_utils.mock_lambda_handler(success_names, warning_names)[source]
Parameters:success_names – collection of function names that will have successful

invocations :param warning_names: collection of warning names that will have warnings during their invocations

tests.manager_tests.test_manager module

class tests.manager_tests.test_manager.ManagerTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

MOCK_API_URL = u'https://api.example.com'
MOCK_CALLBACK_URL = u'https://callback.example.com/'
MOCK_GOGS_URL = u'https://mock.gogs.io'
call_args(mock_object, num_args, num_kwargs=0)[source]
Parameters:
  • mock_object – mock object that is expected to have been called
  • num_args – expected number of (non-keyword) arguments
  • num_kwargs – expected number of keyword arguments
Returns:

(args, kwargs) of last invocation of mock_object

mock_db = None
mock_gogs = None
mock_job_db = None
mock_lambda = None
mock_module_db = None
patches = []
setUp()[source]
classmethod setUpClass()[source]

Create mock AWS handlers, and apply corresponding monkey patches

classmethod tearDownClass()[source]
test_debug_print()[source]
test_get_update_delete_job()[source]

Test [get/update/delete]_job methods

test_get_update_delete_module()[source]

Test [get/update/delete]_module methods

test_list()[source]

Test list_jobs and list_endpoint methods

test_register_module()[source]
test_setup_job()[source]

Successful call of setup_job

test_setup_job_malformed_input()[source]

Call setup_job with malformed data arguments

test_setup_job_no_converter()[source]

Call setup_job when there is no applicable converter.

test_start_job1()[source]

Call start job in job 1 from mock data. Should be a successful invocation with warnings.

test_start_job2()[source]

Call start_job in job 2 from mock data. Should be a successful invocation without warnings.

test_start_job3()[source]

Call start_job on job 3 from mock data. Invocation should result in an error

test_start_job_failure()[source]

Call start_job with non-runnable/non-existent jobs

Module contents