Skip to content

Commit ad51506

Browse files
committed
Use better assertion in test
1 parent dba885a commit ad51506

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/test_validation.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,8 @@ class Hero(SQLModel, table=True):
125125

126126
with Session(engine) as session:
127127
hero = session.get(Hero, 1)
128-
assert not session.dirty
129-
assert not session.new
128+
assert session._is_clean()
130129

131130
Hero.model_validate(hero)
132131

133-
assert not session.dirty
134-
assert not session.new
132+
assert session._is_clean()

0 commit comments

Comments
 (0)