From 9c0786602b463c7bb7ad78575717068e487fd00e Mon Sep 17 00:00:00 2001 From: Simon Oliver Tveit Date: Fri, 23 Feb 2024 11:22:03 +0100 Subject: [PATCH] Set client fixture as function scoped got some issues testing session stuff when the client was shared amongst all tests, maybe it got old or something as well. Getting a fresh client for each test was a lot better --- tests/integration/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 5f0b7807d4..03f73a9e80 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -217,7 +217,7 @@ def localhost_using_legacy_db(): conn.commit() -@pytest.fixture(scope='session') +@pytest.fixture(scope='function') def client(admin_username, admin_password): """Provides a Django test Client object already logged in to the web UI as an admin"""