Skip to content

Commit

Permalink
fixing testing configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiHaDev committed Mar 24, 2024
1 parent 07d3494 commit 83c4459
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"
Expand Down

0 comments on commit 83c4459

Please sign in to comment.