From 31f594745d3a2753f240de947d7dc78c286b203e Mon Sep 17 00:00:00 2001 From: vincent porte Date: Tue, 17 Dec 2024 18:22:54 +0100 Subject: [PATCH] setup function scoped fixture to compress before each test. Scope to function to be complient with db fixture --- lacommunaute/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 lacommunaute/conftest.py diff --git a/lacommunaute/conftest.py b/lacommunaute/conftest.py new file mode 100644 index 00000000..c0d250f9 --- /dev/null +++ b/lacommunaute/conftest.py @@ -0,0 +1,7 @@ +import pytest +from django.core.management import call_command + + +@pytest.fixture(scope="function", autouse=True) +def run_compress(db): + call_command("compress", "--force")