move code linting to a stricter pep8-esque auto-formatting tool, black

This commit is contained in:
Ryan Petrello
2021-03-19 12:44:51 -04:00
parent 9b702e46fe
commit c2ef0a6500
671 changed files with 20538 additions and 21924 deletions

View File

@@ -1,4 +1,5 @@
from __future__ import (absolute_import, division, print_function)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import pytest
@@ -8,10 +9,7 @@ from awx.main.models import Label
@pytest.mark.django_db
def test_create_label(run_module, admin_user, organization):
result = run_module('tower_label', dict(
name='test-label',
organization=organization.name
), admin_user)
result = run_module('tower_label', dict(name='test-label', organization=organization.name), admin_user)
assert not result.get('failed'), result.get('msg', result)
assert result.get('changed', False)
@@ -20,10 +18,7 @@ def test_create_label(run_module, admin_user, organization):
@pytest.mark.django_db
def test_create_label_using_org_id(run_module, admin_user, organization):
result = run_module('tower_label', dict(
name='test-label',
organization=organization.id
), admin_user)
result = run_module('tower_label', dict(name='test-label', organization=organization.id), admin_user)
assert not result.get('failed'), result.get('msg', result)
assert result.get('changed', False)
@@ -34,11 +29,7 @@ def test_create_label_using_org_id(run_module, admin_user, organization):
def test_modify_label(run_module, admin_user, organization):
label = Label.objects.create(name='test-label', organization=organization)
result = run_module('tower_label', dict(
name='test-label',
new_name='renamed-label',
organization=organization.name
), admin_user)
result = run_module('tower_label', dict(name='test-label', new_name='renamed-label', organization=organization.name), admin_user)
assert not result.get('failed'), result.get('msg', result)
assert result.get('changed', False)