mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
move code linting to a stricter pep8-esque auto-formatting tool, black
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user