From bc0d50c677985d2854ddf6039dcb34a8b0c34ad9 Mon Sep 17 00:00:00 2001 From: Cyril Margorin Date: Mon, 22 Nov 2021 17:02:50 +0300 Subject: [PATCH] Create test case for invalid 'FSMContextProxy.update()' function --- tests/test_dispatcher/test_fsm_context.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/test_dispatcher/test_fsm_context.py diff --git a/tests/test_dispatcher/test_fsm_context.py b/tests/test_dispatcher/test_fsm_context.py new file mode 100644 index 00000000..0674c9f9 --- /dev/null +++ b/tests/test_dispatcher/test_fsm_context.py @@ -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")