mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add tests
This commit is contained in:
parent
2104368ac8
commit
c4fda4e3e3
1 changed files with 9 additions and 0 deletions
|
|
@ -466,3 +466,12 @@ class TestRouter:
|
|||
|
||||
response = await root_router.update.trigger(update)
|
||||
assert response == "KABOOM"
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_router_level_hierarchy(self):
|
||||
root_router = Router()
|
||||
list_of_routers = [Router(level=3), Router(level=2), Router()]
|
||||
for i in list_of_routers:
|
||||
root_router.include_router(i)
|
||||
|
||||
assert root_router.sub_routers == list(reversed(list_of_routers))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue