Add sqlite to the test suite

This commit is contained in:
Oleg Matviichuk 2025-07-27 16:38:57 +02:00
parent ddcedadfbd
commit 8a18b1d282
2 changed files with 11 additions and 0 deletions

View file

@ -18,6 +18,7 @@ from aiogram.fsm.storage.memory import (
)
from aiogram.fsm.storage.mongo import MongoStorage
from aiogram.fsm.storage.redis import RedisStorage
from aiogram.fsm.storage.sqlite import SqliteStorage
from tests.mocked_bot import MockedBot
DATA_DIR = Path(__file__).parent / "data"
@ -111,6 +112,15 @@ async def memory_storage():
await storage.close()
@pytest.fixture()
async def squlite_storage():
storage = SqliteStorage()
try:
yield storage
finally:
await storage.close()
@pytest.fixture()
async def redis_isolation(redis_storage):
isolation = redis_storage.create_isolation()

View file

@ -12,6 +12,7 @@ from aiogram.fsm.storage.base import BaseStorage, StorageKey
pytest.lazy_fixture("redis_storage"),
pytest.lazy_fixture("mongo_storage"),
pytest.lazy_fixture("memory_storage"),
pytest.lazy_fixture("sqlite_storage"),
],
)
class TestStorages: