Skip to content

Commit 86a4a6e

Browse files
author
hornet
committed
fix tests
1 parent 3fb7958 commit 86a4a6e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ chardet==3.0.4
66
click>=8.1.3
77
coverage>=5.2.1
88
entrypoints==0.3
9-
fastapi==0.92.0
9+
fastapi==0.72.0
1010
flake8==3.7.9
1111
idna==2.8
1212
importlib-metadata==1.5.0

tests/test_session.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ async def test_outside_of_route_without_context_fails(app, db, SQLAlchemyMiddlew
115115
async def test_init_session(app, db, SQLAlchemyMiddleware):
116116
app.add_middleware(SQLAlchemyMiddleware, db_url=db_url)
117117

118-
await db()._init_session()
119-
assert isinstance(db.session, AsyncSession)
118+
async with db():
119+
assert isinstance(db.session, AsyncSession)
120120

121121

122122
@pytest.mark.parametrize("commit_on_exit", [True, False])

0 commit comments

Comments
 (0)