flake8 cleanup

This commit is contained in:
Wayne Witzel III
2019-04-08 09:35:46 -04:00
parent bb5c7a98f3
commit 5c1d2a6f0b
3 changed files with 20 additions and 26 deletions

View File

@@ -27,15 +27,16 @@ EXPECTED_VALUES = {
'awx_instance_memory':0.0,
'awx_instance_info':1.0,
}
@pytest.mark.django_db
def test_metrics_counts(organization_factory, job_template_factory,
workflow_job_template_factory):
def test_metrics_counts(organization_factory, job_template_factory, workflow_job_template_factory):
objs = organization_factory('org', superusers=['admin'])
jt = job_template_factory('test', organization=objs.organization,
inventory='test_inv', project='test_project',
credential='test_cred')
jt = job_template_factory(
'test', organization=objs.organization,
inventory='test_inv', project='test_project',
credential='test_cred'
)
workflow_job_template_factory('test')
models.Team(organization=objs.organization).save()
models.Host(inventory=jt.inventory).save()
@@ -52,4 +53,4 @@ def test_metrics_counts(organization_factory, job_template_factory,
for sample in gauge.samples:
# name, label, value, timestamp, exemplar
name, _, value, _, _ = sample
assert EXPECTED_VALUES[name] == value
assert EXPECTED_VALUES[name] == value