ming commited on
Commit
7e21075
·
1 Parent(s): fa85955

fix: correct TestClient imports to use starlette.testclient

Browse files
Files changed (2) hide show
  1. tests/test_api.py +1 -3
  2. tests/test_api_errors.py +1 -3
tests/test_api.py CHANGED
@@ -34,6 +34,4 @@ def test_summarize_endpoint_validation_error():
34
  "/api/v1/summarize/",
35
  json={"text": ""}
36
  )
37
- assert resp.status_code == 422
38
-
39
-
 
34
  "/api/v1/summarize/",
35
  json={"text": ""}
36
  )
37
+ assert resp.status_code == 422
 
 
tests/test_api_errors.py CHANGED
@@ -30,6 +30,4 @@ def test_request_id_header_propagated(sample_text, mock_ollama_response):
30
  with patch('httpx.AsyncClient', return_value=StubAsyncClient(post_result=stub_response)):
31
  resp = client.post("/api/v1/summarize/", json={"text": sample_text})
32
  assert resp.status_code == 200
33
- assert resp.headers.get("X-Request-ID")
34
-
35
-
 
30
  with patch('httpx.AsyncClient', return_value=StubAsyncClient(post_result=stub_response)):
31
  resp = client.post("/api/v1/summarize/", json={"text": sample_text})
32
  assert resp.status_code == 200
33
+ assert resp.headers.get("X-Request-ID")