mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add sqlite to the test suite
This commit is contained in:
parent
ddcedadfbd
commit
8a18b1d282
2 changed files with 11 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue