Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for return_no_content (0.12 sec)

  1. tests/test_return_none_stringified_annotations.py

    import http
    
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    
    
    def test_no_content():
        app = FastAPI()
    
        @app.get("/no-content", status_code=http.HTTPStatus.NO_CONTENT)
        def return_no_content() -> "None":
            return
    
        client = TestClient(app)
        response = client.get("/no-content")
        assert response.status_code == http.HTTPStatus.NO_CONTENT, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 20 18:44:43 UTC 2025
    - 431 bytes
    - Viewed (0)
Back to top