Skip to content

Commit b557ae4

Browse files
committed
add test
1 parent c0dc7b9 commit b557ae4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit/test_lifespan.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,13 @@ async def test_new_lifespan_with_connect_args(sqlalchemy_url):
5353

5454
async with lifespan(app):
5555
pass
56+
57+
58+
async def test_new_lifespan_fails_with_invalid_connect_args(sqlalchemy_url):
59+
from fastsqla import new_lifespan
60+
61+
lifespan = new_lifespan(sqlalchemy_url, connect_args={"this is wrong": False})
62+
63+
with raises(TypeError):
64+
async with lifespan(app):
65+
pass

0 commit comments

Comments
 (0)