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 0df3241 commit 3854a2fCopy full SHA for 3854a2f
src/mock_vws/_requests_mock_server/mock_web_query_api.py
@@ -7,6 +7,7 @@
7
import email.utils
8
from collections.abc import Callable, Iterable, Mapping
9
from http import HTTPMethod, HTTPStatus
10
+from types import MethodType
11
12
from beartype import beartype
13
from requests.models import PreparedRequest
@@ -52,8 +53,9 @@ def decorator(
52
53
The given `method` with multiple changes, including added
54
validators.
55
"""
56
+ route_name = method.__name__ if isinstance(method, MethodType) else ""
57
new_route = Route(
- route_name=method.__name__,
58
+ route_name=route_name,
59
path_pattern=path_pattern,
60
http_methods=frozenset(http_methods),
61
)
0 commit comments