Skip to content

Commit 7d1e28b

Browse files
committed
Refactored
1 parent bcd3052 commit 7d1e28b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/unit/app/test_routers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_router_prefix(self, router: Any) -> Optional[str]:
114114
------
115115
IndexError: If the router is not registered in the mock app.
116116
"""
117-
return list(filter(lambda r: r[0] == router, self.routers))[0][1]
117+
return next(filter(lambda r: r[0] == router, self.routers))[1]
118118

119119

120120
def test_include_routers() -> None:

0 commit comments

Comments
 (0)