From 063239179cc0e8b0bcd5882365469d451cc70461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Freitag?= Date: Wed, 18 Dec 2024 10:07:29 +0100 Subject: [PATCH] Run compress before to run the test suite --- lacommunaute/conftest.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lacommunaute/conftest.py b/lacommunaute/conftest.py index c0d250f9..0bfa2d3b 100644 --- a/lacommunaute/conftest.py +++ b/lacommunaute/conftest.py @@ -2,6 +2,7 @@ from django.core.management import call_command -@pytest.fixture(scope="function", autouse=True) -def run_compress(db): - call_command("compress", "--force") +@pytest.fixture(scope="session", autouse=True) +def run_compress(django_db_setup, django_db_blocker): + with django_db_blocker.unblock(): + call_command("compress", "--force")