Fix tests

This commit is contained in:
Oleg Matviichuk 2025-07-30 14:02:28 +02:00
parent 2fd6616c64
commit 42ec3e5706
2 changed files with 3 additions and 2 deletions

View file

@ -80,7 +80,7 @@ class SqliteStorage(BaseStorage):
f"""SELECT state
FROM aiogram_fsm
WHERE id = ?""",
(id),
(id,),
)
row = await cursor.fetchone()

View file

@ -114,11 +114,12 @@ async def memory_storage():
@pytest.fixture()
async def sqlite_storage():
storage = SqliteStorage.connect("aiogram_fsm_test.sqlite")
storage = await SqliteStorage.connect("aiogram_fsm_test.sqlite")
try:
yield storage
finally:
await storage.close()
Path("aiogram_fsm_test.sqlite").unlink()
@pytest.fixture()