Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix merge artifacts
Browse files Browse the repository at this point in the history
provinzkraut committed Jun 16, 2024
1 parent 959441b commit a34e951
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions tests/unit/test_openapi/test_integration.py
Original file line number Diff line number Diff line change
@@ -85,21 +85,6 @@ def test_openapi_yaml_not_allowed(
assert response.status_code == HTTP_404_NOT_FOUND


def test_openapi_json_not_allowed(person_controller: type[Controller], pet_controller: type[Controller]) -> None:
# only tested with the OpenAPIController, b/c new router based approach always serves `openapi.json`.
openapi_config = OpenAPIConfig(
"Example API",
"1.0.0",
)

with create_test_client([person_controller, pet_controller], openapi_config=openapi_config) as client:
assert client.app.openapi_schema
openapi_schema = client.app.openapi_schema
assert openapi_schema.paths
response = client.get("/schema/openapi.json")
assert response.status_code == HTTP_404_NOT_FOUND


@pytest.mark.parametrize(
"schema_paths",
[
@@ -108,7 +93,7 @@ def test_openapi_json_not_allowed(person_controller: type[Controller], pet_contr
],
)
def test_openapi_controller_internal_schema_conversion(schema_paths: list[str]) -> None:
openapi_config = OpenAPIConfig("Example API", "1.0.0")
openapi_config = OpenAPIConfig("Example API", "1.0.0", render_plugins=(YamlRenderPlugin(),))

with create_test_client([], openapi_config=openapi_config) as client:
for schema_path in schema_paths:

0 comments on commit a34e951

Please sign in to comment.