From 5a8bcd357b5fc09c845e2a659ccf4d1c2ef63904 Mon Sep 17 00:00:00 2001 From: John Westcott IV Date: Mon, 31 Aug 2020 10:41:25 -0400 Subject: [PATCH] Fixing linting issues --- awx_collection/plugins/modules/tower_instance_group.py | 6 +++--- awx_collection/test/awx/test_instance_group.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/awx_collection/plugins/modules/tower_instance_group.py b/awx_collection/plugins/modules/tower_instance_group.py index c878090ff4..6424be4b3b 100644 --- a/awx_collection/plugins/modules/tower_instance_group.py +++ b/awx_collection/plugins/modules/tower_instance_group.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python # coding: utf-8 -*- @@ -35,7 +35,7 @@ options: type: str credential: 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 type: str policy_instance_percentage: @@ -127,7 +127,7 @@ def main(): if instances is not None: instances_ids = [] 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 new_fields = {} diff --git a/awx_collection/test/awx/test_instance_group.py b/awx_collection/test/awx/test_instance_group.py index cf00299f3c..b548c59b6e 100644 --- a/awx_collection/test/awx/test_instance_group.py +++ b/awx_collection/test/awx/test_instance_group.py @@ -6,6 +6,7 @@ import pytest from awx.main.models import InstanceGroup, Instance from awx.main.tests.functional.conftest import kube_credential, credentialtype_kube + @pytest.mark.django_db def test_instance_group_create(run_module, admin_user): 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 len(all_instance_names) == 1, 'Too many instances in group {0}'.format(','.join(all_instance_names)) + @pytest.mark.django_db def test_continer_group_create(run_module, admin_user, kube_credential): pod_spec = "{ 'Nothing': True }"