aiogram/tests/test_dispatcher
darksidecat bc5b26de5f
Add __eq__ and __hash__ methods to State class (#928)
* Fix the ability to copy the state, now copying the state will return the same state.

* reformat

* full implement deepcopy with memo dict, add typehints

* Update aiogram/dispatcher/fsm/state.py

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update tests

Co-authored-by: Oleg A. <t0rr@mail.ru>

* remove deepcopy in tests

Co-authored-by: Oleg A. <t0rr@mail.ru>

* remove deepcopy method

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update changes description

Co-authored-by: Oleg A. <t0rr@mail.ru>

* update __eq__  method

Co-authored-by: Oleg A. <t0rr@mail.ru>

* add typehints, tests

* return False for not equal objects
creating FilterObject use getfullargspec that check State equality with `type` and `object` builtins, raising Error in `__eq__` method of State break this behavior

* return NotImplemented for other types

* use `!=` instead of 'not x == y' in tests

Co-authored-by: Oleg A. <t0rr@mail.ru>
2022-07-08 02:26:49 +03:00
..
test_event Beta 3 (#884) 2022-04-16 19:07:32 +03:00
test_filters Add __eq__ and __hash__ methods to State class (#928) 2022-07-08 02:26:49 +03:00
test_flags Bot API 5.7 and some new features (#834) 2022-02-19 01:45:59 +02:00
test_fsm Bot API 5.7 and some new features (#834) 2022-02-19 01:45:59 +02:00
test_handler refactor: remove redundant pytest marks (#654) 2021-08-03 23:40:14 +03:00
test_middlewares Dev 3.x i18n & improvements (#696) 2021-09-22 00:52:38 +03:00
test_webhook Bot API 5.7 and some new features (#834) 2022-02-19 01:45:59 +02:00
__init__.py Add tests for handler 2019-11-24 00:17:21 +02:00
test_dispatcher.py [3.x] Bot API 6.0 (#890) 2022-04-19 22:03:24 +03:00
test_router.py #896 Restrict including routers with strings (#897) 2022-04-25 21:24:58 +03:00