FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

✅ Update tests to check for deprecation · fastapi/sqlmodel@5f4d502 · GitHub

Repository navigation

Commit 5f4d502

Browse files
committed
✅ Update tests to check for deprecation
1 parent 3b2f955 commit 5f4d502

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/test_query.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Optional
22

3+
import pytest
34
from sqlmodel import Field, Session, SQLModel, create_engine
45

56

@@ -21,6 +22,7 @@ class Hero(SQLModel, table=True):
2122
session.refresh(hero_1)
2223

2324
with Session(engine) as session:
24-
query_hero = session.query(Hero).first()
25+
with pytest.warns(DeprecationWarning):
26+
query_hero = session.query(Hero).first()
2527
assert query_hero
2628
assert query_hero.name == hero_1.name

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL