We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3854a2f commit 70368d7Copy full SHA for 70368d7
src/mock_vws/_requests_mock_server/mock_web_services_api.py
@@ -12,6 +12,7 @@
12
import uuid
13
from collections.abc import Callable, Iterable, Mapping
14
from http import HTTPMethod, HTTPStatus
15
+from types import MethodType
16
from typing import Any
17
from zoneinfo import ZoneInfo
18
@@ -67,8 +68,9 @@ def decorator(
67
68
The given `method` with multiple changes, including added
69
validators.
70
"""
71
+ route_name = method.__name__ if isinstance(method, MethodType) else ""
72
new_route = Route(
- route_name=method.__name__,
73
+ route_name=route_name,
74
path_pattern=path_pattern,
75
http_methods=frozenset(http_methods),
76
)
0 commit comments