Skip to content

Commit

Permalink
Use better assertion in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mskrip committed Aug 7, 2024
1 parent 23aff38 commit dfd9b30
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,8 @@ class Hero(SQLModel, table=True):

with Session(engine) as session:
hero = session.get(Hero, 1)
assert not session.dirty
assert not session.new
assert session._is_clean()

Hero.model_validate(hero)

assert not session.dirty
assert not session.new
assert session._is_clean()

0 comments on commit dfd9b30

Please sign in to comment.