Example #1
0
 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)
Example #2
0
 def test_spawned_tasks_none(self):
     result = dispatch.spawned_tasks({'spawned_tasks': None})
     target_dict = {'spawned_tasks': []}
     compare_dict(result, target_dict)
Example #3
0
 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)
Example #4
0
 def test_spawned_tasks_none(self):
     result = dispatch.spawned_tasks({'spawned_tasks': None})
     target_dict = {'spawned_tasks': []}
     compare_dict(result, target_dict)
Example #5
0
 def test_no_spawned_tasks(self):
     result = dispatch.spawned_tasks({'spawned_tasks': []})
     compare_dict(result, {})