Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for test_get_response (0.18 sec)

  1. tests/test_response_code_no_body.py

    )
    async def a():
        pass
    
    
    @app.get("/b", responses={204: {"description": "No Content"}})
    async def b():
        pass  # pragma: no cover
    
    
    client = TestClient(app)
    
    
    def test_get_response():
        response = client.get("/a")
        assert response.status_code == 204, response.text
        assert "content-length" not in response.headers
        assert response.content == b""
    
    
    def test_openapi_schema():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.2K bytes
    - Viewed (0)
Back to top