[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:
Alex Root Junior 2021-05-11 23:04:32 +03:00 committed by GitHub
parent a6f824a117
commit 0e72d8e65b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
265 changed files with 2921 additions and 1324 deletions

View file

@ -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