mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 13:55:04 -02:30
flake8 fixes
This commit is contained in:
@@ -843,7 +843,6 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
|||||||
'''
|
'''
|
||||||
Start the task running via Celery.
|
Start the task running via Celery.
|
||||||
'''
|
'''
|
||||||
task_class = self._get_task_class()
|
|
||||||
(res, opts) = self.pre_start(**kwargs)
|
(res, opts) = self.pre_start(**kwargs)
|
||||||
if res:
|
if res:
|
||||||
self.start_celery_task(opts, error_callback, success_callback)
|
self.start_celery_task(opts, error_callback, success_callback)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ def scheduler_factory(mocker, epoch):
|
|||||||
|
|
||||||
def no_create_inventory_update(task, ignore):
|
def no_create_inventory_update(task, ignore):
|
||||||
raise RuntimeError("create_inventory_update should not be called")
|
raise RuntimeError("create_inventory_update should not be called")
|
||||||
|
|
||||||
def no_create_project_update(task):
|
def no_create_project_update(task):
|
||||||
raise RuntimeError("create_project_update should not be called")
|
raise RuntimeError("create_project_update should not be called")
|
||||||
|
|
||||||
|
|||||||
@@ -3,16 +3,6 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
|
|
||||||
# awx
|
|
||||||
from awx.main.scheduler.partial import (
|
|
||||||
JobDict,
|
|
||||||
ProjectUpdateDict,
|
|
||||||
)
|
|
||||||
|
|
||||||
# TODO: wherever get_latest_rpoject_update_task() is stubbed and returns a
|
|
||||||
# ProjectUpdateDict. We should instead return a ProjectUpdateLatestDict()
|
|
||||||
# For now, this is ok since the fields on deviate that much.
|
|
||||||
|
|
||||||
class TestJobBlocked():
|
class TestJobBlocked():
|
||||||
def test_inventory_update_waiting(self, scheduler_factory, waiting_inventory_update, pending_job):
|
def test_inventory_update_waiting(self, scheduler_factory, waiting_inventory_update, pending_job):
|
||||||
scheduler = scheduler_factory(tasks=[waiting_inventory_update, pending_job])
|
scheduler = scheduler_factory(tasks=[waiting_inventory_update, pending_job])
|
||||||
|
|||||||
@@ -1,18 +1,4 @@
|
|||||||
|
|
||||||
# Python
|
|
||||||
import pytest
|
|
||||||
from datetime import timedelta
|
|
||||||
|
|
||||||
# Django
|
|
||||||
from django.utils.timezone import now as tz_now
|
|
||||||
|
|
||||||
# awx
|
|
||||||
from awx.main.scheduler.partial import (
|
|
||||||
JobDict,
|
|
||||||
ProjectUpdateDict,
|
|
||||||
)
|
|
||||||
from awx.main.scheduler import Scheduler
|
|
||||||
|
|
||||||
# TODO: wherever get_latest_rpoject_update_task() is stubbed and returns a
|
# TODO: wherever get_latest_rpoject_update_task() is stubbed and returns a
|
||||||
# ProjectUpdateDict. We should instead return a ProjectUpdateLatestDict()
|
# ProjectUpdateDict. We should instead return a ProjectUpdateLatestDict()
|
||||||
# For now, this is ok since the fields on deviate that much.
|
# For now, this is ok since the fields on deviate that much.
|
||||||
|
|||||||
Reference in New Issue
Block a user