Relative Content

Tag Archive for pythonpytestpytest-asyncio

Fixture not clearing database before each test

I am writing tests for a FastAPI application using httpx and pytest-asyncio. I want to ensure that the MongoDB database is cleared before each test method. However, despite setting up the fixture with scope="function" and autouse=True, it seems that the database is not being cleared before each test.