File tree Expand file tree Collapse file tree 1 file changed +1
-13
lines changed
exmaples/fastapi_example/tests/transactional Expand file tree Collapse file tree 1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change 1414
1515import pytest_asyncio
1616
17- from sqlalchemy .ext .asyncio import async_sessionmaker , AsyncSession
17+ from sqlalchemy .ext .asyncio import AsyncSession
1818
1919from exmaples .fastapi_example .database import master
2020from context_async_sqlalchemy import (
2424)
2525
2626
27- @pytest_asyncio .fixture
28- async def db_session_test (
29- session_maker_test : async_sessionmaker [AsyncSession ],
30- ) -> AsyncGenerator [AsyncSession ]:
31- """The session that is used inside the test"""
32- async with session_maker_test () as session :
33- try :
34- yield session
35- finally :
36- await session .rollback ()
37-
38-
3927@pytest_asyncio .fixture (autouse = True )
4028async def db_session_override (
4129 db_session_test : AsyncSession ,
You can’t perform that action at this time.
0 commit comments