Fixing linting issues

This commit is contained in:
John Westcott IV
2020-08-31 10:41:25 -04:00
parent 1bd8f4ad3e
commit 5a8bcd357b
2 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/python
# coding: utf-8 -*- # coding: utf-8 -*-
@@ -35,7 +35,7 @@ options:
type: str type: str
credential: credential:
description: description:
- Credential to authenticate with Kubernetes or OpenShift. Must be of type "Kubernetes/OpenShift API Bearer Token. - Credential to authenticate with Kubernetes or OpenShift. Must be of type "Kubernetes/OpenShift API Bearer Token".
required: False required: False
type: str type: str
policy_instance_percentage: policy_instance_percentage:
@@ -127,7 +127,7 @@ def main():
if instances is not None: if instances is not None:
instances_ids = [] instances_ids = []
for item in instances: for item in instances:
instances_ids.append( module.resolve_name_to_id('instances', item) ) instances_ids.append(module.resolve_name_to_id('instances', item))
# Create the data that gets sent for create and update # Create the data that gets sent for create and update
new_fields = {} new_fields = {}

View File

@@ -6,6 +6,7 @@ import pytest
from awx.main.models import InstanceGroup, Instance from awx.main.models import InstanceGroup, Instance
from awx.main.tests.functional.conftest import kube_credential, credentialtype_kube from awx.main.tests.functional.conftest import kube_credential, credentialtype_kube
@pytest.mark.django_db @pytest.mark.django_db
def test_instance_group_create(run_module, admin_user): def test_instance_group_create(run_module, admin_user):
result = run_module('tower_instance_group', { result = run_module('tower_instance_group', {
@@ -41,6 +42,7 @@ def test_instance_group_create(run_module, admin_user):
assert new_instance.hostname in all_instance_names, 'Failed to add instance to group' assert new_instance.hostname in all_instance_names, 'Failed to add instance to group'
assert len(all_instance_names) == 1, 'Too many instances in group {0}'.format(','.join(all_instance_names)) assert len(all_instance_names) == 1, 'Too many instances in group {0}'.format(','.join(all_instance_names))
@pytest.mark.django_db @pytest.mark.django_db
def test_continer_group_create(run_module, admin_user, kube_credential): def test_continer_group_create(run_module, admin_user, kube_credential):
pod_spec = "{ 'Nothing': True }" pod_spec = "{ 'Nothing': True }"