diff --git a/tests/test_dispatcher/test_router.py b/tests/test_dispatcher/test_router.py index 9d425388..a9f1f063 100644 --- a/tests/test_dispatcher/test_router.py +++ b/tests/test_dispatcher/test_router.py @@ -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))