Open vincentporte opened 1 year ago
test_create_user_async
fails.
Failed: [undefined]Fixture "db_session" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
Neither
def test_create_user_async(client, db_session)
nor
@pytest.mark.asyncio
async def test_create_user_async(client, db_session):
# Ensure the users list is empty before creating a new user
response = await client.get("/api/users/")
assert response.status_code == 200
solve the issue
Description
🎸 set
db_session
as fixture for testsType of change
Checklist: