mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
update tests
This commit is contained in:
parent
53a1bcf5e1
commit
6ee420db80
1 changed files with 5 additions and 3 deletions
|
|
@ -38,13 +38,15 @@ class TestRouter:
|
|||
router1 = Router()
|
||||
router2 = Router()
|
||||
|
||||
with pytest.raises(ValueError, match="You must provide routers"):
|
||||
router.include_routers()
|
||||
|
||||
router.include_routers(router1, router2)
|
||||
|
||||
assert router.sub_routers == [router1, router2]
|
||||
|
||||
def test_including_many_routers_bad_type(self):
|
||||
router = Router()
|
||||
with pytest.raises(ValueError, match="You must provide routers"):
|
||||
router.include_routers()
|
||||
|
||||
def test_include_router_by_string_bad_type(self):
|
||||
router = Router()
|
||||
with pytest.raises(ValueError, match=r"router should be instance of Router"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue