Browse Source

🎨 [pre-commit.ci] Auto format from pre-commit.com hooks

pull/13464/head
pre-commit-ci[bot] 4 weeks ago
parent
commit
159824ea93
  1. 3
      tests/test_forms_defaults.py

3
tests/test_forms_defaults.py

@ -82,7 +82,6 @@ if PYDANTIC_V2:
default_str: Annotated[str, Form(default="foo")]
true_if_unset: Annotated[Optional[bool], Form(default=None)]
class SimpleForm(BaseModel):
"""https://github.com/fastapi/fastapi/pull/13464#issuecomment-2708378172"""
@ -200,7 +199,6 @@ if PYDANTIC_V2:
async def json_annotated_form(value: AnnotatedFormModel) -> ResponseModel:
return ResponseModel.from_value(value)
@app.post("/simple-form")
def form_endpoint(model: Annotated[SimpleForm, Form()]) -> dict:
"""https://github.com/fastapi/fastapi/pull/13464#issuecomment-2708378172"""
@ -285,6 +283,7 @@ def test_no_prefill_defaults_partially_set(encoding, model_type, client):
assert "default_zero" not in dumped_exclude_default
assert "default_zero" not in response_model.dumped_fields_exclude_default
@needs_pydanticv2
def test_casted_empty_defaults(client: TestClient):
"""https://github.com/fastapi/fastapi/pull/13464#issuecomment-2708378172"""

Loading…
Cancel
Save