Skip to content

Commit

Permalink
test: fix test_awaitable_relation_field
Browse files Browse the repository at this point in the history
  • Loading branch information
2jun0 committed Mar 28, 2024
1 parent 7897857 commit 13eca1c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tests/test_awaitable_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ class Hero(AsyncSQLModel, table=True):
await session.commit()

async with AsyncSession(engine) as session:
hero = (
await session.exec(select(Hero).where(Hero.id == hero_rusty_man.id))
).one()
hero = (await session.exec(select(Hero).where(Hero.name == "Rusty-Man"))).one()

# loading lazy loading attribute will raise MissingGreenlet error
with pytest.raises(MissingGreenlet):
Expand Down

0 comments on commit 13eca1c

Please sign in to comment.