flake8, pytest, license fixes

This commit is contained in:
chris meyers
2020-03-18 10:55:24 -04:00
committed by Ryan Petrello
parent 18f5dd6e04
commit 87de0cf0b3
20 changed files with 966 additions and 107 deletions

View File

@@ -8,7 +8,6 @@ import os
import time
from django.conf import settings
import redis
# Mock
from unittest import mock

View File

@@ -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