1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Fix up some unit tests where we have slightly changed the meaning of cancel

This commit is contained in:
Matthew Jones 2014-09-08 11:23:23 -04:00
parent 68cbc7883c
commit 0c40ca36f6
2 changed files with 1 additions and 4 deletions

View File

@ -1020,7 +1020,7 @@ class JobStartCancelTest(BaseJobTestMixin, django.test.LiveServerTestCase):
job.save()
with self.current_user(self.user_sue):
response = self.get(url)
if status in ('pending', 'running'):
if status in ('new', 'pending', 'waiting', 'running'):
self.assertTrue(response['can_cancel'])
response = self.post(url, {}, expect=202)
else:

View File

@ -778,9 +778,6 @@ class RunJobTest(BaseCeleryTest):
job.save()
self.assertEqual(job.status, 'new')
self.assertEqual(job.cancel_flag, False)
# Calling cancel before start has no effect.
self.assertFalse(job.cancel())
self.assertEqual(job.cancel_flag, False)
self.assertFalse(job.passwords_needed_to_start)
job.cancel_flag = True
job.save()