From f9ffe6d52e5ee139632d89e5dabc2f5ec580c93e Mon Sep 17 00:00:00 2001 From: chris meyers Date: Wed, 8 Jun 2016 09:24:49 -0400 Subject: [PATCH] move factory fixture * Move factory fixture back one directory so unit tests can now take advantage of them; while still allowing functional tests to use them --- awx/main/tests/conftest.py | 27 +++++++++++++++++++++++++++ awx/main/tests/functional/conftest.py | 23 ----------------------- 2 files changed, 27 insertions(+), 23 deletions(-) create mode 100644 awx/main/tests/conftest.py diff --git a/awx/main/tests/conftest.py b/awx/main/tests/conftest.py new file mode 100644 index 0000000000..d2a29fc220 --- /dev/null +++ b/awx/main/tests/conftest.py @@ -0,0 +1,27 @@ + +# Python +import pytest + +from awx.main.tests.factories import ( + create_organization, + create_job_template, + create_notification_template, + create_survey_spec, +) + +@pytest.fixture +def job_template_factory(): + return create_job_template + +@pytest.fixture +def organization_factory(): + return create_organization + +@pytest.fixture +def notification_template_factory(): + return create_notification_template + +@pytest.fixture +def survey_spec_factory(): + return create_survey_spec + diff --git a/awx/main/tests/functional/conftest.py b/awx/main/tests/functional/conftest.py index 6a817b3126..812e4b1495 100644 --- a/awx/main/tests/functional/conftest.py +++ b/awx/main/tests/functional/conftest.py @@ -38,13 +38,6 @@ from awx.main.models.organization import ( from awx.main.models.notifications import NotificationTemplate -from awx.main.tests.factories import ( - create_organization, - create_job_template, - create_notification_template, - create_survey_spec, -) - ''' Disable all django model signals. ''' @@ -490,19 +483,3 @@ def job_template_labels(organization, job_template): return job_template -@pytest.fixture -def job_template_factory(): - return create_job_template - -@pytest.fixture -def organization_factory(): - return create_organization - -@pytest.fixture -def notification_template_factory(): - return create_notification_template - -@pytest.fixture -def survey_spec_factory(): - return create_survey_spec -