Exemple #1
0
 def check_b(self, trunk, task):
     task.wait()
     self.assertEqual(task.status, Task.STATUS_SUCCESS, 'task_b should have succeeded.')
     self.assertEqual(task.result, 5, 'task_b result should be 5')
     self.check_f(task.subtasks.get(details__result=5))
     self.check_g(task.subtasks.get(details__result='g'))
     self.check_h(task.subtasks.get(details__result='h'))
Exemple #2
0
 def check_a(self, trunk, task):
     task.wait()
     assert task.status == Task.STATUS_INCOMPLETE, 'task_a should be incomplete.'
     # self.assertEqual(task.result, 'e', 'task_a result should be "e"')
     self.check_c(task.subtasks.get(details__result='c'))
     self.check_d(task.subtasks.get(details__error__isnull=False))
     self.check_e(task.subtasks.get(details__result='e'))
Exemple #3
0
 def check_h(self, task):
     task.wait()
     assert task.result == 'h', 'task_h result should be "h"'
Exemple #4
0
 def check_g(self, task):
     task.wait()
     assert task.result == 'g', 'task_g result should be "g"'
Exemple #5
0
 def check_f(self, task):
     task.wait()
     self.assertEqual(task.result, 5, 'task_f result should be 5')
Exemple #6
0
 def check_e(self, task):
     task.wait()
     assert task.result == 'e', 'task_e result should be "e"'
Exemple #7
0
 def check_d(self, task):
     task.wait()
     assert task.result == None, 'task_d result should be "None"'
     self.assertEqual(task.error, 'Task D, should fail.', 'task_d should have an error')
Exemple #8
0
 def check_c(self, task):
     task.wait()
     assert task.result == 'c', 'task_c result should be "c"'
Exemple #9
0
 def check_trunk(self, task):
     task.wait()
     self.assertEqual(task.status, Task.STATUS_INCOMPLETE, 'trunk should be incomplete.')
     self.check_a(task, task.subtasks.get(signature__func_name='cq.management.commands.cq_load_test.task_a'))
     self.check_b(task, task.subtasks.get(signature__func_name='cq.management.commands.cq_load_test.task_b'))