Replies: 1 comment
-
Hi @michalzan Here's my fixture, it works well. @pytest.fixture
async def api_client(mongodb, init_db) -> TestClient:
from tmw_server.app import app
await app.start()
return AuthTestClient(app) Did you add to pytest.ini [pytest]
asyncio_mode=auto |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am creating an integration test with pytest fixture and following the official documentation. I have copy-pasted the fixtures from there, but I have a problem, that the API fixture is not of the Application type, but AsyncGenerator type, so as expected it does not work. Am I missing something? Here is an image for better understanding:
Thanks for all the comments and advice.
Beta Was this translation helpful? Give feedback.
All reactions