From 748bdbd2dd7e31cf858dcd8093c715bee196b3d7 Mon Sep 17 00:00:00 2001 From: John Westcott IV Date: Tue, 4 Aug 2020 11:21:18 -0400 Subject: [PATCH] Fix python3 Zuul error with awxkit --- awx_collection/test/awx/conftest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awx_collection/test/awx/conftest.py b/awx_collection/test/awx/conftest.py index 53270d0e7f..5db00d6325 100644 --- a/awx_collection/test/awx/conftest.py +++ b/awx_collection/test/awx/conftest.py @@ -24,7 +24,10 @@ except ImportError: HAS_TOWER_CLI = False try: - import awxkit + # Because awxkit will be a directory at the root of this makefile and we are using python3, import awxkit will work even if its not installed. + # However, awxkit will not contain api whih causes a stack failure down on line 170 when we try to mock it. + # So here we are importing awxkit.api to prevent that. Then you only get an error on tests for awxkit functionality. + import awxkit.api HAS_AWX_KIT = True except ImportError: HAS_AWX_KIT = False