Skip to content

Commit

Permalink
fix: Set English language before checking for it.
Browse files Browse the repository at this point in the history
  • Loading branch information
marksweb committed Apr 21, 2024
1 parent be7477b commit e78e3d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/applications/views/test_applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from django.db import connection
from django.test.utils import CaptureQueriesContext
from django.urls import reverse
from django.utils import translation

from applications.models import Application, Score
from applications.views import application_list
Expand Down Expand Up @@ -35,6 +36,7 @@ def test_organiser_only_decorator_without_page_url(rf, user, future_event):


def test_organiser_menu_in_applications_list(admin_client, future_event):
translation.activate("en")
applications_url = reverse("applications:applications", kwargs={"page_url": future_event.page_url})
resp = admin_client.get(applications_url)
messaging_url = reverse("applications:communication", kwargs={"page_url": future_event.page_url})
Expand Down
2 changes: 2 additions & 0 deletions tests/applications/views/test_applications_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
from io import StringIO

from django.urls import reverse
from django.utils import translation

from applications.models import Answer, Application, Question


def test_download_applications_list(admin_client, future_event, future_event_form, applications):
translation.activate("en")
applications_url = reverse("applications:applications_csv", kwargs={"page_url": future_event.page_url})
resp = admin_client.get(applications_url)
assert resp.status_code == 200
Expand Down

0 comments on commit e78e3d1

Please sign in to comment.