From 3bdac1a84d363c876fc4b735fa75590fcb3ffead Mon Sep 17 00:00:00 2001 From: Michal Reznik Date: Thu, 7 Dec 2017 14:46:06 +0100 Subject: [PATCH] tests: move CA related modules to pytest_plugins Till now both create_caless_pki.py and create_external_ca.py were stored in test_integration folder. However when trying to import e.g. "from create_external_ca import ExternalCA" from tasks.py where all other integration test`s support functions lives we get "AttributeError: module 'pytest' has no attribute 'config' as pytest was not completely initialized at the moment of the import. https://pagure.io/freeipa/issue/7302 Reviewed-By: Florence Blanc-Renaud --- .../integration}/create_caless_pki.py | 0 .../integration}/create_external_ca.py | 0 ipatests/test_integration/test_caless.py | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename ipatests/{test_integration => pytest_plugins/integration}/create_caless_pki.py (100%) rename ipatests/{test_integration => pytest_plugins/integration}/create_external_ca.py (100%) diff --git a/ipatests/test_integration/create_caless_pki.py b/ipatests/pytest_plugins/integration/create_caless_pki.py similarity index 100% rename from ipatests/test_integration/create_caless_pki.py rename to ipatests/pytest_plugins/integration/create_caless_pki.py diff --git a/ipatests/test_integration/create_external_ca.py b/ipatests/pytest_plugins/integration/create_external_ca.py similarity index 100% rename from ipatests/test_integration/create_external_ca.py rename to ipatests/pytest_plugins/integration/create_external_ca.py diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index 7177c5d35..5faf0f429 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -33,9 +33,9 @@ from ipapython import ipautil from ipaplatform.paths import paths from ipapython.dn import DN from ipatests.test_integration.base import IntegrationTest -from ipatests.test_integration import create_caless_pki -from ipatests.test_integration.create_external_ca import ExternalCA from ipatests.pytest_plugins.integration import tasks +from ipatests.pytest_plugins.integration.create_external_ca import ExternalCA +from ipatests.pytest_plugins.integration import create_caless_pki from ipalib.constants import DOMAIN_LEVEL_0 if six.PY3: