Skip to content

Commit

Permalink
Try
Browse files Browse the repository at this point in the history
  • Loading branch information
estyxx committed Feb 13, 2024
1 parent cd7b88f commit 539824c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
13 changes: 0 additions & 13 deletions backend/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
from users.tests.factories import UserFactory
from api.cms.tests.factories import * # noqa

from django.test.utils import override_settings


@pytest.fixture()
def user(db):
Expand Down Expand Up @@ -131,14 +129,3 @@ def wrapper(conference):
)

return wrapper


@pytest.fixture(scope="session", autouse=True)
def test_settings():
with override_settings(**TEST_SETTINGS):
yield


TEST_SETTINGS = {
"ALLOWED_HOSTS ": ["*"],
}
12 changes: 12 additions & 0 deletions backend/grants/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,21 @@
from django.http import HttpRequest
from wagtail.models import Site, Page

from django.test.utils import override_settings

pytestmark = pytest.mark.django_db


@pytest.fixture(scope="session", autouse=True)
def test_settings():
with override_settings(
**{
"ALLOWED_HOSTS ": ["*"],
}
):
yield


def _setup_visa_page_and_request(request: HttpRequest, site: Site):
"""
Configures request for testing and ensures 'visa' page existence.
Expand Down

0 comments on commit 539824c

Please sign in to comment.