Replies: 2 comments 2 replies
-
I couldn't figure out a solution that didn't fall apart and moved to fastapi. See #1920 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the built-in litestar plugin for SQLAlchemy and I'm trying to figure out how to make it use the same connection as the one I created in tests. The goal is to run a rollback on the connection after each test to avoid side effects. In my current implementation, I get the following error:
My guess is that litestar runs in a different event loop from the one that is used by pytest-asyncio but I don't see a way to pass an event loop into the app. Did anyone already solve the problem? Do you have rollbacks in your tests?
This is the full code of the test fixtures:
Beta Was this translation helpful? Give feedback.
All reactions