diff --git a/tests/test_openapi_form_alias.py b/tests/test_openapi_form_alias.py index bda32d360..c045c2abc 100644 --- a/tests/test_openapi_form_alias.py +++ b/tests/test_openapi_form_alias.py @@ -1,7 +1,6 @@ from typing import Annotated import pytest - from fastapi import FastAPI, Form from fastapi.testclient import TestClient @@ -21,26 +20,17 @@ def route_with_form_annotated(form_param: Annotated[str, Form(alias="aliased-fie client = TestClient(app) -@pytest.mark.parametrize( - "path", - ["/old-style", "/annotated"] -) +@pytest.mark.parametrize("path", ["/old-style", "/annotated"]) def test_get_route(path: str): response = client.post(path, data={"aliased-field": "Hello, World!"}) assert response.status_code == 200, response.text assert response.json() == {} -@pytest.mark.parametrize( - "schema_obj", - ["Body_annotated", "Body_old_style"] -) +@pytest.mark.parametrize("schema_obj", ["Body_annotated", "Body_old_style"]) def test_form_alias_is_correct(schema_obj: str): response = client.get("/openapi.json") assert response.status_code == 200, response.text print(response.json()["components"]["schemas"]) - form_properties = ( - response.json() - ["components"]["schemas"][schema_obj]["properties"] - ) + form_properties = response.json()["components"]["schemas"][schema_obj]["properties"] assert "aliased-field" in form_properties