mirror of
https://github.com/ansible/awx.git
synced 2026-05-23 08:37:48 -02:30
Fix up flake8 errors
This commit is contained in:
@@ -188,10 +188,10 @@ def label(organization):
|
|||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def notification_template(organization):
|
def notification_template(organization):
|
||||||
return NotificationTemplate.objects.create(name='test-notification_template',
|
return NotificationTemplate.objects.create(name='test-notification_template',
|
||||||
organization=organization,
|
organization=organization,
|
||||||
notification_type="webhook",
|
notification_type="webhook",
|
||||||
notification_configuration=dict(url="http://localhost",
|
notification_configuration=dict(url="http://localhost",
|
||||||
headers={"Test": "Header"}))
|
headers={"Test": "Header"}))
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def admin(user):
|
def admin(user):
|
||||||
return user('admin', True)
|
return user('admin', True)
|
||||||
@@ -276,10 +276,10 @@ def notification_template_factory(organization):
|
|||||||
notification_template = NotificationTemplate.objects.get(name=name)
|
notification_template = NotificationTemplate.objects.get(name=name)
|
||||||
except NotificationTemplate.DoesNotExist:
|
except NotificationTemplate.DoesNotExist:
|
||||||
notification_template = NotificationTemplate(name=name,
|
notification_template = NotificationTemplate(name=name,
|
||||||
organization=organization,
|
organization=organization,
|
||||||
notification_type="webhook",
|
notification_type="webhook",
|
||||||
notification_configuration=dict(url="http://localhost",
|
notification_configuration=dict(url="http://localhost",
|
||||||
headers={"Test": "Header"}))
|
headers={"Test": "Header"}))
|
||||||
notification_template.save()
|
notification_template.save()
|
||||||
return notification_template
|
return notification_template
|
||||||
return n
|
return n
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ class TestJobTemplateSerializerValidation(object):
|
|||||||
|
|
||||||
good_extra_vars = ["{\"test\": \"keys\"}", "---\ntest: key"]
|
good_extra_vars = ["{\"test\": \"keys\"}", "---\ntest: key"]
|
||||||
bad_extra_vars = ["{\"test\": \"keys\"", "---\ntest: [2"]
|
bad_extra_vars = ["{\"test\": \"keys\"", "---\ntest: [2"]
|
||||||
|
|
||||||
def test_validate_extra_vars(self):
|
def test_validate_extra_vars(self):
|
||||||
serializer = JobTemplateSerializer()
|
serializer = JobTemplateSerializer()
|
||||||
for ev in self.good_extra_vars:
|
for ev in self.good_extra_vars:
|
||||||
|
|||||||
Reference in New Issue
Block a user