From 83c44595e528d0d83c3fb4bd6abb3f6034e97f46 Mon Sep 17 00:00:00 2001 From: Tai Ha Date: Sun, 24 Mar 2024 16:38:06 +1100 Subject: [PATCH] fixing testing configuration --- tests/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 3581e5fd..b251fa51 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,14 +34,14 @@ def transactional_test(create_test_database, request): connection.close() -@pytest.fixture(scope='module') +@pytest.fixture(scope='session') def test_client(): with app.test_client() as testing_client: with app.app_context(): yield testing_client -@pytest.fixture(scope='module') +@pytest.fixture(scope='session') def create_user(): session = Session() test_user = User( @@ -63,8 +63,8 @@ def create_user(): session.close() -@pytest.fixture(scope='module') -def auth_token(test_client): +@pytest.fixture(scope='session') +def auth_token(test_client, create_user): login_payload = { "email": "admin", "password": "admin"