Home / Function/ test_raises_pydantic_v1_model_in_return_type() — fastapi Function Reference

test_raises_pydantic_v1_model_in_return_type() — fastapi Function Reference

Architecture documentation for the test_raises_pydantic_v1_model_in_return_type() function in test_pydantic_v1_error.py from the fastapi codebase.

Entity Profile

Dependency Diagram

graph TD
  f8246d5f_507d_1eae_bfc1_97e261b5bd72["test_raises_pydantic_v1_model_in_return_type()"]
  91d1a80c_1c46_e7d1_13fc_d70d9ed094b5["test_pydantic_v1_error.py"]
  f8246d5f_507d_1eae_bfc1_97e261b5bd72 -->|defined in| 91d1a80c_1c46_e7d1_13fc_d70d9ed094b5
  style f8246d5f_507d_1eae_bfc1_97e261b5bd72 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_pydantic_v1_error.py lines 33–43

def test_raises_pydantic_v1_model_in_return_type() -> None:
    class ReturnModelV1(BaseModel):
        name: str

    app = FastAPI()

    with pytest.raises(PydanticV1NotSupportedError):

        @app.get("/return")
        def endpoint() -> ReturnModelV1:  # pragma: no cover
            return ReturnModelV1(name="test")

Domain

Subdomains

Frequently Asked Questions

What does test_raises_pydantic_v1_model_in_return_type() do?
test_raises_pydantic_v1_model_in_return_type() is a function in the fastapi codebase, defined in tests/test_pydantic_v1_error.py.
Where is test_raises_pydantic_v1_model_in_return_type() defined?
test_raises_pydantic_v1_model_in_return_type() is defined in tests/test_pydantic_v1_error.py at line 33.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free