mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
[3.0] Bot API 5.1 + FSM + Utils (#525)
* Regenerate corresponding to Bot API 5.1 * Added base of FSM. Markup constructor and small refactoring * Fix dependencies * Fix mypy windows error * Move StatesGroup.get_root() from meta to class * Fixed chat and user constraints * Update pipeline * Remove docs pipeline * Added GLOBAL_USER FSM strategy * Reformat code * Fixed Dispatcher._process_update * Bump Bot API 5.2. Added integration with MagicFilter * Coverage
This commit is contained in:
parent
a6f824a117
commit
0e72d8e65b
265 changed files with 2921 additions and 1324 deletions
|
|
@ -3,6 +3,7 @@ from typing import Any, Dict, Union
|
|||
|
||||
import pytest
|
||||
|
||||
from aiogram import F
|
||||
from aiogram.dispatcher.event.handler import CallableMixin, FilterObject, HandlerObject
|
||||
from aiogram.dispatcher.filters import Text
|
||||
from aiogram.dispatcher.filters.base import BaseFilter
|
||||
|
|
@ -127,6 +128,14 @@ class TestCallableMixin:
|
|||
assert result == {"foo": 42, "bar": "test", "baz": "fuz"}
|
||||
|
||||
|
||||
class TestFilterObject:
|
||||
def test_post_init(self):
|
||||
case = F.test
|
||||
filter_obj = FilterObject(callback=case)
|
||||
print(filter_obj.callback)
|
||||
assert filter_obj.callback == case.resolve
|
||||
|
||||
|
||||
async def simple_handler(*args, **kwargs):
|
||||
return args, kwargs
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue