From 1f100d329b7e6e024550aa8ad8ff4d0c8ef09ed6 Mon Sep 17 00:00:00 2001 From: bronsen Date: Thu, 13 Mar 2025 18:13:16 +0100 Subject: [PATCH] [pytest] create session-scoped `django.test.Client` fixture --- collector/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/collector/conftest.py b/collector/conftest.py index 7e0d44d..a925f11 100644 --- a/collector/conftest.py +++ b/collector/conftest.py @@ -1,5 +1,12 @@ import pytest +from django.test import Client + @pytest.fixture(autouse=True) def enable_db_access_for_all_tests(db): pass + + +@pytest.fixture(scope="session", name="session") +def fixture_longlived_client() -> Client: + return Client()