mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
flake8, pytest, license fixes
This commit is contained in:
committed by
Ryan Petrello
parent
18f5dd6e04
commit
87de0cf0b3
@@ -8,7 +8,6 @@ import os
|
||||
import time
|
||||
|
||||
from django.conf import settings
|
||||
import redis
|
||||
|
||||
# Mock
|
||||
from unittest import mock
|
||||
|
||||
@@ -103,7 +103,8 @@ class TestComputedFields:
|
||||
Schedule.objects.filter(pk=s.pk).update(next_run=old_next_run)
|
||||
s.next_run = old_next_run
|
||||
prior_modified = s.modified
|
||||
s.update_computed_fields()
|
||||
with mock.patch('awx.main.models.schedules.emit_channel_notification'):
|
||||
s.update_computed_fields()
|
||||
assert s.next_run != old_next_run
|
||||
assert s.modified == prior_modified
|
||||
|
||||
@@ -133,7 +134,8 @@ class TestComputedFields:
|
||||
assert s.next_run is None
|
||||
assert job_template.next_schedule is None
|
||||
s.rrule = self.distant_rrule
|
||||
s.update_computed_fields()
|
||||
with mock.patch('awx.main.models.schedules.emit_channel_notification'):
|
||||
s.update_computed_fields()
|
||||
assert s.next_run is not None
|
||||
assert job_template.next_schedule == s
|
||||
|
||||
|
||||
Reference in New Issue
Block a user