Skip to content

Commit

Permalink
fix: Extracted / to module constant SLASH
Browse files Browse the repository at this point in the history
  • Loading branch information
Hultner authored and Stranger6667 committed Mar 19, 2020
1 parent d455672 commit 6245832
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/schemathesis/_hypothesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .types import Hook

PARAMETERS = frozenset(("path_parameters", "headers", "cookies", "query", "body", "form_data"))
SLASH = "/"


def create_test(
Expand Down Expand Up @@ -159,12 +160,12 @@ def filter_path_parameters(parameters: Dict[str, Any]) -> bool:

path_parameter_blacklist = (
".",
"/",
SLASH,
"",
)

return not any(
(value in path_parameter_blacklist or isinstance(value, str) and path_parameter_blacklist[1] in value)
(value in path_parameter_blacklist or isinstance(value, str) and SLASH in value)
for value in parameters.values()
)

Expand Down

0 comments on commit 6245832

Please sign in to comment.