Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ filterwarnings = [
"error",
"ignore:The 'app' shortcut is now deprecated.:DeprecationWarning",
"ignore:Pydantic serializer warnings:UserWarning",
"ignore:jsonschema.exceptions.RefResolutionError is deprecated:DeprecationWarning",
"default:jsonschema.exceptions.RefResolutionError is deprecated:DeprecationWarning",
"default:jsonschema.RefResolver is deprecated as of v4.18.0:DeprecationWarning",
]
markers = [
"mock_products",
Expand Down
2 changes: 1 addition & 1 deletion pystapi-validator/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "MIT"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"schemathesis>=3.37.0",
"schemathesis>=3.39.14",
"pytest>=8.3.3",
"requests>=2.32.3",
"pyyaml>=6.0.2",
Expand Down
20 changes: 2 additions & 18 deletions pystapi-validator/tests/validate_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

import pytest
import schemathesis
from schemathesis.checks import (
content_type_conformance,
negative_data_rejection,
not_a_server_error,
response_headers_conformance,
response_schema_conformance,
status_code_conformance,
)

schemathesis.experimental.OPEN_API_3_1.enable()

Expand All @@ -21,19 +13,11 @@

@schema.parametrize()
def test_api(case):
response = case.call_and_validate(base_url=BASE_URL)
case.validate_response(response)

not_a_server_error(response, case)
status_code_conformance(response, case)
content_type_conformance(response, case)
response_schema_conformance(response, case)
response_headers_conformance(response, case)
negative_data_rejection(response, case)
case.call_and_validate(base_url=BASE_URL)


def test_openapi_specification():
assert schema.validate()
schema.validate()


@pytest.hookimpl(tryfirst=True, hookwrapper=True)
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.