Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for test_default_response_class_skips_json_dumps (0.22 seconds)

  1. tests/test_dump_json_fast_path.py

    
    @app.get("/explicit", response_class=JSONResponse)
    def get_explicit() -> Item:
        return Item(name="widget", price=9.99)
    
    
    client = TestClient(app)
    
    
    def test_default_response_class_skips_json_dumps():
        """When no response_class is set, the fast path serializes directly to
        JSON bytes via Pydantic's dump_json and never calls json.dumps."""
        with patch(
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 22 16:07:19 GMT 2026
    - 1.4K bytes
    - Click Count (0)
Back to Top