Coverage for tests/test_return_none_stringified_annotations.py: 100%
12 statements
« prev ^ index » next coverage.py v7.6.1, created at 2025-09-22 00:03 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2025-09-22 00:03 +0000
1import http 1ghijkl
3from fastapi import FastAPI 1ghijkl
4from fastapi.testclient import TestClient 1ghijkl
7def test_no_content(): 1ghijkl
8 app = FastAPI() 1abcdef
10 @app.get("/no-content", status_code=http.HTTPStatus.NO_CONTENT) 1abcdef
11 def return_no_content() -> "None": 1abcdef
12 return 1abcdef
14 client = TestClient(app) 1abcdef
15 response = client.get("/no-content") 1abcdef
16 assert response.status_code == http.HTTPStatus.NO_CONTENT, response.text 1abcdef
17 assert not response.content 1abcdef