Create test case for invalid 'FSMContextProxy.update()' function

This commit is contained in:
Cyril Margorin 2021-11-22 17:02:50 +03:00
parent bccfca7cae
commit bc0d50c677

View file

@ -0,0 +1,11 @@
import pytest
from aiogram.contrib.fsm_storage.memory import MemoryStorage
from aiogram.dispatcher import FSMContext
class TestFSMContext:
@pytest.mark.asyncio
async def test_update_data(self):
context = FSMContext(MemoryStorage(), chat=1, user=1)
async with context.proxy() as data:
data.update(key1="value1", key2="value2")