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