]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
✅ Add missing test for OpenAPI examples, it was missing in coverage (#10188)
authorSebastián Ramírez <tiangolo@gmail.com>
Fri, 1 Sep 2023 21:36:08 +0000 (23:36 +0200)
committerGitHub <noreply@github.com>
Fri, 1 Sep 2023 21:36:08 +0000 (23:36 +0200)
✅ Add missing test for OpenAPI examples, it seems it was discovered in coverage by an upgrade in AnyIO

tests/test_openapi_examples.py

index d0e35953e156c2204a2a8df8c75a9380ebe44c0f..70664a8a4c07873188c7d96af985ecb0f8fbe076 100644 (file)
@@ -125,6 +125,9 @@ client = TestClient(app)
 
 
 def test_call_api():
+    response = client.post("/examples/", json={"data": "example1"})
+    assert response.status_code == 200, response.text
+
     response = client.get("/path_examples/foo")
     assert response.status_code == 200, response.text