Remove redundant list() around sorted() and fix router type name in validation error message (#1788)

* Remove redundant list() around sorted()

* Fix type name in error message for router type validation

* Add changelog
This commit is contained in:
m-xim 2026-04-04 01:42:04 +03:00 committed by GitHub
parent 0611d0d953
commit 19a6131618
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 4 deletions

View file

@ -50,7 +50,9 @@ class TestRouter:
def test_include_router_by_string_bad_type(self):
router = Router()
with pytest.raises(ValueError, match=r"router should be instance of Router"):
with pytest.raises(
ValueError, match=r"router should be instance of Router not 'TestRouter'"
):
router.include_router(self)
def test_set_parent_router_bad_type(self):