Skip to content

Commit 5a4d629

Browse files
Obada HaddadAnne-Catherine L.
authored andcommitted
re-enabled django acting as celery for some tasks
1 parent 7cc6eb3 commit 5a4d629

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
- run:
7878
name: "Tests: Run end-to-end (E2E) tests"
7979
command: |
80-
cd tests && $HOME/.local/bin/uv run pytest test_auth.py test_account_creation.py test_competition.py test_submission.py
80+
cd tests && CI=True $HOME/.local/bin/uv run pytest test_auth.py test_account_creation.py test_competition.py test_submission.py
8181
no_output_timeout: 30m
8282

8383
# Example to run specific set of tests (for debugging individual tests from a batch of tests)

src/settings/test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
DEBUG = True
55

6+
CELERY_TASK_ALWAYS_EAGER = True
7+
68
# Don't use whitenoise -- so we don't get exceptions for missing files
79
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
810

tests/test_submission.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def test_v18(page: Page):
101101

102102

103103
# Skip this test if in the CI
104-
@pytest.mark.skipif(ci, reason="Works locally but fails in the CI for some reason")
104+
@pytest.mark.skipif(ci, reason="Works locally but fails in the CI because of CELERY_TASK_ALWAYS_EAGER = True")
105105
def test_v2_multiTask(page: Page) -> None:
106106
page.goto("/")
107107
page.get_by_role("link", name=" Benchmarks/Competitions").click()
@@ -155,7 +155,7 @@ def test_v2_multiTask(page: Page) -> None:
155155

156156

157157
# Skip this test if in the CI
158-
@pytest.mark.skipif(ci, reason="Works locally but fails in the CI for some reason")
158+
@pytest.mark.skipif(ci, reason="Works locally but fails in the CI because of CELERY_TASK_ALWAYS_EAGER = True"")
159159
def test_v2_multiTaskFactSheet(page: Page) -> None:
160160
page.goto("/")
161161
page.get_by_role("link", name=" Benchmarks/Competitions").click()

0 commit comments

Comments
 (0)