def test_spawned_tasks(self): result = dispatch.spawned_tasks({'spawned_tasks': ['apple']}) target_dict = { 'spawned_tasks': [dispatch.link_obj('/pulp/api/v2/tasks/apple/')] } target_dict['spawned_tasks'][0].update({'task_id': 'apple'}) compare_dict(result, target_dict)
def test_spawned_tasks_none(self): result = dispatch.spawned_tasks({'spawned_tasks': None}) target_dict = {'spawned_tasks': []} compare_dict(result, target_dict)
def test_spawned_tasks(self): result = dispatch.spawned_tasks({'spawned_tasks': ['apple']}) target_dict = {'spawned_tasks': [dispatch.link_obj('/pulp/api/v2/tasks/apple/')]} target_dict['spawned_tasks'][0].update({'task_id': 'apple'}) compare_dict(result, target_dict)
def test_spawned_tasks_none(self): result = dispatch.spawned_tasks({'spawned_tasks': None}) target_dict = {'spawned_tasks': []} compare_dict(result, target_dict)
def test_no_spawned_tasks(self): result = dispatch.spawned_tasks({'spawned_tasks': []}) compare_dict(result, {})