mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
iter states in states group
This commit is contained in:
parent
9451a085d1
commit
31ab2cab5e
2 changed files with 10 additions and 0 deletions
|
|
@ -150,3 +150,10 @@ class TestStatesGroup:
|
|||
assert 42 not in MyGroup
|
||||
|
||||
assert MyGroup.MyNestedGroup.get_root() is MyGroup
|
||||
|
||||
def test_iterable(self):
|
||||
class Group(StatesGroup):
|
||||
x = State()
|
||||
y = State()
|
||||
|
||||
assert set(Group) == {Group.x, Group.y}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue