Skip to content

Commit

Permalink
Exclude options method
Browse files Browse the repository at this point in the history
  • Loading branch information
francbartoli committed Oct 12, 2024
1 parent 096527b commit 91561ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ def tests(session: NoxPoetrySession) -> None:
session.install(".")
session.install("coverage[toml]", "pytest", "pygments", "schemathesis")
try:
# session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
session.run("py.test", *session.posargs)
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
finally:
if session.interactive:
session.notify("coverage", posargs=[])
Expand Down
4 changes: 2 additions & 2 deletions tests/test_openapi_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
schema_bearer = schemathesis.from_pytest_fixture("protected_bearer_schema")


@schema_apikey.parametrize()
@schema_apikey.exclude(method="OPTIONS").parametrize()
def test_api_with_apikey(case):
"""Test the API with API-KEY protection."""
if case.path_parameters:
Expand All @@ -23,7 +23,7 @@ def test_api_with_apikey(case):
case.validate_response(response)


@schema_bearer.parametrize()
@schema_bearer.exclude(method="OPTIONS").parametrize()
def test_api_with_bearer(case, access_token):
"""Test the API with Authorization Bearer token protection."""
if case.path_parameters:
Expand Down

0 comments on commit 91561ff

Please sign in to comment.