From 3b5640aca3b09c1e7be73c58acb60b8cc742f06a Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Wed, 24 Jun 2020 10:41:41 -0400 Subject: [PATCH] fix test --- awx/main/tests/data/inventory/plugins/tower/env.json | 1 + awx/main/tests/functional/test_inventory_source_injectors.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/awx/main/tests/data/inventory/plugins/tower/env.json b/awx/main/tests/data/inventory/plugins/tower/env.json index abdfef7e8d..9ce3d90f95 100644 --- a/awx/main/tests/data/inventory/plugins/tower/env.json +++ b/awx/main/tests/data/inventory/plugins/tower/env.json @@ -3,5 +3,6 @@ "TOWER_HOST": "https://foo.invalid", "TOWER_PASSWORD": "fooo", "TOWER_USERNAME": "fooo", + "TOWER_OAUTH_TOKEN": "", "TOWER_VERIFY_SSL": "False" } \ No newline at end of file diff --git a/awx/main/tests/functional/test_inventory_source_injectors.py b/awx/main/tests/functional/test_inventory_source_injectors.py index 7e35f9a51b..392abf8535 100644 --- a/awx/main/tests/functional/test_inventory_source_injectors.py +++ b/awx/main/tests/functional/test_inventory_source_injectors.py @@ -124,6 +124,9 @@ def fake_credential_factory(): for var in var_specs.keys(): inputs[var] = generate_fake_var(var_specs[var]) + if source == 'tower': + inputs.pop('oauth_token') # mutually exclusive with user/pass + return Credential.objects.create( credential_type=ct, inputs=inputs