Skip to content

Commit

Permalink
Add coverage to routers
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsil committed Jul 21, 2023
1 parent 90128b7 commit c1ce48b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions esmerald/routing/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ def __init__(
include_middleware: Sequence["Middleware"] = []

for _middleware in self.middleware:
if isinstance(_middleware, StarletteMiddleware):
if isinstance(_middleware, StarletteMiddleware): # pragma: no cover
include_middleware.append(_middleware) # type: ignore
else:
include_middleware.append(
Expand Down Expand Up @@ -1070,7 +1070,7 @@ def resolve_route_path_handler(
"""
routing: List[Union[Gateway, WebSocketGateway, Include]] = []

for route in routes:
for route in routes: # pragma: no cover
if not isinstance(route, (Include, Gateway, WebSocketGateway)):
raise ImproperlyConfigured("The route must be of type Gateway or Include")

Expand Down

0 comments on commit c1ce48b

Please sign in to comment.