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:
parent
68cbc7883c
commit
0c40ca36f6
@ -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:
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user