mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
Fix flake8 warnings.
This commit is contained in:
parent
0d9d9db1f9
commit
48bbac7f18
@ -55,7 +55,7 @@ class FactGetSingleFactsTest(BaseFactTest):
|
||||
self.fact_data = []
|
||||
self.fact_objs = []
|
||||
self.hostnames = []
|
||||
for i in range(1, host_count+1):
|
||||
for i in range(1, host_count + 1):
|
||||
fact_data = deepcopy(TEST_FACT_DATA)
|
||||
fact_data['hostname'] = fact_data['hostname'] % (i)
|
||||
fact_data['add_fact_data']['timestamp'] = datetime.now().replace(year=2015 - i)
|
||||
|
||||
@ -10,7 +10,6 @@ from copy import deepcopy
|
||||
|
||||
# AWX
|
||||
from awx.fact.models.fact import * # noqa
|
||||
from awx.main.tests.base import BaseTest, MongoDBRequired
|
||||
from .base import BaseFactTest
|
||||
|
||||
__all__ = ['FactHostTest', 'FactTest', 'FactGetHostVersionTest', 'FactGetHostTimelineTest']
|
||||
|
||||
@ -66,8 +66,8 @@ class Command(NoArgsCommand):
|
||||
def cleanup_ad_hoc_commands(self):
|
||||
for ad_hoc_command in AdHocCommand.objects.all():
|
||||
ad_hoc_command_display = '"%s" (started %s, %d events)' % \
|
||||
(unicode(ad_hoc_command), unicode(ad_hoc_command.created),
|
||||
ad_hoc_command.ad_hoc_command_events.count())
|
||||
(unicode(ad_hoc_command), unicode(ad_hoc_command.created),
|
||||
ad_hoc_command.ad_hoc_command_events.count())
|
||||
if ad_hoc_command.status in ('pending', 'waiting', 'running'):
|
||||
action_text = 'would skip' if self.dry_run else 'skipping'
|
||||
self.logger.debug('%s %s ad hoc command %s', action_text, ad_hoc_command.status, ad_hoc_command_display)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user