From 0c02d253083c3fb23a48ca5264c58627e681705a Mon Sep 17 00:00:00 2001 From: Lila Date: Fri, 11 Oct 2024 13:42:06 -0400 Subject: [PATCH] Uncomment out scm_inventory --- awx/main/tests/functional/conftest.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/awx/main/tests/functional/conftest.py b/awx/main/tests/functional/conftest.py index b90cc4cd4c8b..2e3cbc83fc97 100644 --- a/awx/main/tests/functional/conftest.py +++ b/awx/main/tests/functional/conftest.py @@ -359,7 +359,7 @@ def kube_credential(credentialtype_kube): @pytest.fixture def inventory(organization): - available_providers = compute_cloud_inventory_sources() + available_providers = tuple(compute_cloud_inventory_sources()) if available_providers: if not organization.inventories.exists(): @@ -382,18 +382,18 @@ def insights_inventory(inventory): return inventory -# @pytest.fixture -# def scm_inventory_source(inventory, project): -# inv_src = InventorySource( -# name="test-scm-inv", -# source_project=project, -# source='scm', -# source_path='inventory_file', -# inventory=inventory, -# ) -# with mock.patch('awx.main.models.unified_jobs.UnifiedJobTemplate.update'): -# inv_src.save() -# return inv_src +@pytest.fixture +def scm_inventory_source(inventory, project): + inv_src = InventorySource( + name="test-scm-inv", + source_project=project, + source='scm', + source_path='inventory_file', + inventory=inventory, + ) + with mock.patch('awx.main.models.unified_jobs.UnifiedJobTemplate.update'): + inv_src.save() + return inv_src @pytest.fixture