diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..750d8ce --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,7 @@ +import pytest +from django.conf import settings + + +def pytest_sessionstart(session): + print("test") + settings.configure() diff --git a/tests/test_middleware.py b/tests/test_middleware.py index 82e896d..bf07c1e 100644 --- a/tests/test_middleware.py +++ b/tests/test_middleware.py @@ -1,12 +1,5 @@ -from django.http import HttpResponse, HttpRequest -from django.conf import settings +from django.http import HttpResponse from django_signposting.middleware import SignpostingMiddleware -import pytest - - -@pytest.fixture(scope="module", autouse=True) -def configure_django_settings(): - settings.configure() def test_middleware_no_signposting(): diff --git a/tests/test_utils.py b/tests/test_utils.py index 3933411..f11e8a6 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,12 +1,5 @@ from django.http import HttpResponse -from django.conf import settings from django_signposting.utils import add_signposts -import pytest - - -@pytest.fixture(scope="module", autouse=True) -def configure_django_settings(): - settings.configure() def test_add_signpost():