Browse Source

🧪 Tweak test to make it a valid (failing) test

pull/14349/head
Sebastián Ramírez 8 months ago
parent
commit
f19797d18e
  1. 7
      tests/test_schema_ref_pydantic_v2.py

7
tests/test_schema_ref_pydantic_v2.py

@ -1,4 +1,5 @@
import sys import sys
from typing import Any
from fastapi import FastAPI from fastapi import FastAPI
from fastapi.testclient import TestClient from fastapi.testclient import TestClient
@ -19,9 +20,9 @@ class ModelWithRef(BaseModel):
model_config = ConfigDict(validate_by_alias=True, serialize_by_alias=True) model_config = ConfigDict(validate_by_alias=True, serialize_by_alias=True)
@app.get("/") @app.get("/", response_model=ModelWithRef)
async def read_root() -> ModelWithRef: async def read_root() -> Any:
return ModelWithRef(ref="some-ref") return {"$ref": "some-ref"}
client = TestClient(app) client = TestClient(app)

Loading…
Cancel
Save