Skip to content

Commit

Permalink
Reduce scope of strict_app fixture to prevent intertest effects
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeSneyders committed Sep 24, 2022
1 parent 56cc8e6 commit 92857d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions connexion/middleware/request_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ async def __call__(self, scope: Scope, receive: Receive, send: Send):
f"Skipping validation. No validator registered for content type: "
f"{mime_type}."
)
logging.info(f"Available validators: {self._validator_map}")
else:
validator = body_validator(
scope,
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def invalid_resp_allowed_app(request):
return build_app_from_fixture("simple", request.param, validate_responses=False)


@pytest.fixture(scope="session", params=SPECS)
@pytest.fixture(params=SPECS)
def strict_app(request):
return build_app_from_fixture(
"simple", request.param, validate_responses=True, strict_validation=True
Expand Down

0 comments on commit 92857d0

Please sign in to comment.