Skip to content

Commit

Permalink
updates test (tasks cancellation)
Browse files Browse the repository at this point in the history
  • Loading branch information
featalion committed May 22, 2013
1 parent b613ddf commit 5f66919
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test.py
Expand Up @@ -61,16 +61,18 @@ def test_getTaskDetails(self):
self.assertEqual(task_id, task.id)

def test_zcancelTask(self):
time.sleep(2)
tasks = self.worker.tasks()

for task in tasks:
self.worker.cancel(task)

time.sleep(3)
new_tasks = self.worker.tasks()
real_tasks = []
for task in new_tasks:
if task.status not in ['cancelled', 'error']:
if task.status not in ['cancelled', 'error', 'killed']:
real_tasks.append(task)

self.assertEqual(len(real_tasks), 0)

def test_postSchedule(self):
Expand Down

0 comments on commit 5f66919

Please sign in to comment.