Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for test_invalid_response_model_field (0.42 seconds)

  1. tests/test_response_model_invalid.py

    Sebastián Ramírez <******@****.***> 1766006759 -0800
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1.1K bytes
    - Click Count (0)
  2. tests/test_response_model_as_return_annotation.py

        response = client.get("/no_response_model-annotation_json_response_class")
        assert response.status_code == 200, response.text
        assert response.json() == {"foo": "bar"}
    
    
    def test_invalid_response_model_field():
        app = FastAPI()
        with pytest.raises(FastAPIError) as e:
    
            @app.get("/")
            def read_root() -> Response | None:
                return Response(content="Foo")  # pragma: no cover
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 50.3K bytes
    - Click Count (0)
Back to Top