def test_add_message_backend(self): """Validate add message backend functionality""" backend = DummyBackend backend_factory._MESSAGE_BACKENDS = {} backend_factory.add_message_backend(backend) # Yeah, not a typo... coverage backend_factory.add_message_backend(backend) self.assertEqual(backend_factory._MESSAGE_BACKENDS.keys(), ['dummy'])
def setUp(self): django.setup() add_message_backend(AMQPMessagingBackend) # mock out threading.start self.recipe_type = recipe_test_utils.create_recipe_type_v6() self.batch = batch_test_utils.create_batch( recipe_type=self.recipe_type)
def setUp(self): django.setup() self.maxDiff = None add_message_backend(AMQPMessagingBackend) from scheduler.models import Scheduler Scheduler.objects.create(id=1) scheduler_mgr.config.is_paused = False self.agent_1 = Agent('agent_1', 'host_1') self.agent_2 = Agent('agent_2', 'host_2') self.agent_3 = Agent('agent_3', 'host_3') self.agent_4 = Agent('agent_4', 'host_4') self.agent_5 = Agent('agent_5', 'host_5') self.agent_6 = Agent('agent_6', 'host_6') self.agent_7 = Agent('agent_7', 'host_7') self.agent_8 = Agent('agent_8', 'host_8') self.agent_9 = Agent('agent_9', 'host_9') self.agent_10 = Agent('agent_10', 'host_10')
def setUp(self): django.setup() add_message_backend(AMQPMessagingBackend) self.workspace = storage_test_utils.create_workspace() self.source_file = ScaleFile.objects.create(file_name='input_file', file_type='SOURCE', media_type='text/plain', file_size=10, data_type_tags=['type1'], file_path='the_path', workspace=self.workspace) self.source_file.add_data_type_tag('type1') self.source_file.add_data_type_tag('type2') self.source_file.add_data_type_tag('type3') manifest = job_test_utils.create_seed_manifest(inputs_files=[{'name': 'INPUT_FILE', 'media_types': ['text/plain'], 'required': True, 'multiple': True}], inputs_json=[]) self.jt1 = job_test_utils.create_seed_job_type(manifest=manifest) v6_recipe_type_def = {'version': '6', 'input': {'files': [{'name': 'INPUT_FILE', 'media_types': ['text/plain'], 'required': True, 'multiple': True}], 'json': []}, 'nodes': {'node_a': {'dependencies': [], 'input': {'INPUT_FILE': {'type': 'recipe', 'input': 'INPUT_FILE'}}, 'node_type': {'node_type': 'job', 'job_type_name': self.jt1.name, 'job_type_version': self.jt1.version, 'job_type_revision': 1}}}} self.recipe = recipe_test_utils.create_recipe_type_v6(name='test-recipe', definition=v6_recipe_type_def) v7_recipe_type_def = {'version': '7', 'input': {'files': [{'name': 'INPUT_FILE', 'media_types': ['text/plain'], 'required': True, 'multiple': True}], 'json': []}, 'nodes': {'node_a': {'dependencies': [], 'input': {'INPUT_FILE': {'type': 'recipe', 'input': 'INPUT_FILE'}}, 'node_type': {'node_type': 'job', 'job_type_name': self.jt1.name, 'job_type_version': self.jt1.version, 'job_type_revision': 1}}}} self.recipe_v7 = recipe_test_utils.create_recipe_type_v6(name='test-recipe-v7', definition=v7_recipe_type_def)
def setUp(self): django.setup() add_message_backend(AMQPMessagingBackend)
def setUp(self): django.setup() add_message_backend(AMQPMessagingBackend) self.workspace = storage_test_utils.create_workspace() self.recipe = recipe_test_utils.create_recipe_type_v6()