mirror of
https://github.com/dnlbauer/django-signposting.git
synced 2026-09-11 06:25:30 +00:00
fix pytests django settings init
This commit is contained in:
7
tests/conftest.py
Normal file
7
tests/conftest.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import pytest
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
|
def pytest_sessionstart(session):
|
||||||
|
print("test")
|
||||||
|
settings.configure()
|
||||||
@@ -1,12 +1,5 @@
|
|||||||
from django.http import HttpResponse, HttpRequest
|
from django.http import HttpResponse
|
||||||
from django.conf import settings
|
|
||||||
from django_signposting.middleware import SignpostingMiddleware
|
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():
|
def test_middleware_no_signposting():
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.conf import settings
|
|
||||||
from django_signposting.utils import add_signposts
|
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():
|
def test_add_signpost():
|
||||||
|
|||||||
Reference in New Issue
Block a user