@@ -30,7 +30,7 @@ def assistant_id():
3030def test_ingest_assistant_success (
3131 mock_fetch_assistant ,
3232 client : TestClient ,
33- normal_user_api_key_headers : dict [str , str ],
33+ user_api_key_header : dict [str , str ],
3434):
3535 """Test successful assistant ingestion from OpenAI."""
3636 mock_assistant = mock_openai_assistant ()
@@ -39,7 +39,7 @@ def test_ingest_assistant_success(
3939
4040 response = client .post (
4141 f"/api/v1/assistant/{ mock_assistant .id } /ingest" ,
42- headers = normal_user_api_key_headers ,
42+ headers = user_api_key_header ,
4343 )
4444
4545 assert response .status_code == 201
@@ -53,7 +53,7 @@ def test_create_assistant_success(
5353 mock_verify_vector_ids ,
5454 client : TestClient ,
5555 assistant_create_payload : dict ,
56- normal_user_api_key_headers : dict ,
56+ user_api_key_header : dict ,
5757):
5858 """Test successful assistant creation with OpenAI vector store ID verification."""
5959
@@ -62,7 +62,7 @@ def test_create_assistant_success(
6262 response = client .post (
6363 "/api/v1/assistant" ,
6464 json = assistant_create_payload ,
65- headers = normal_user_api_key_headers ,
65+ headers = user_api_key_header ,
6666 )
6767
6868 assert response .status_code == 201
@@ -92,7 +92,7 @@ def test_create_assistant_invalid_vector_store(
9292 mock_verify_vector_ids ,
9393 client : TestClient ,
9494 assistant_create_payload : dict ,
95- normal_user_api_key_headers : dict ,
95+ user_api_key_header : dict ,
9696):
9797 """Test failure when one or more vector store IDs are invalid."""
9898
@@ -106,7 +106,7 @@ def test_create_assistant_invalid_vector_store(
106106 response = client .post (
107107 "/api/v1/assistant" ,
108108 json = payload ,
109- headers = normal_user_api_key_headers ,
109+ headers = user_api_key_header ,
110110 )
111111
112112 assert response .status_code == 400
@@ -175,7 +175,7 @@ def test_update_assistant_invalid_vector_store(
175175
176176def test_update_assistant_not_found (
177177 client : TestClient ,
178- normal_user_api_key_headers : dict ,
178+ user_api_key_header : dict ,
179179):
180180 """Test failure when updating a non-existent assistant."""
181181 update_payload = {"name" : "Updated Assistant" }
@@ -185,7 +185,7 @@ def test_update_assistant_not_found(
185185 response = client .patch (
186186 f"/api/v1/assistant/{ non_existent_id } " ,
187187 json = update_payload ,
188- headers = normal_user_api_key_headers ,
188+ headers = user_api_key_header ,
189189 )
190190
191191 assert response .status_code == 404
@@ -217,14 +217,14 @@ def test_get_assistant_success(
217217
218218def test_get_assistant_not_found (
219219 client : TestClient ,
220- normal_user_api_key_headers : dict ,
220+ user_api_key_header : dict ,
221221):
222222 """Test failure when fetching a non-existent assistant."""
223223 non_existent_id = str (uuid4 ())
224224
225225 response = client .get (
226226 f"/api/v1/assistant/{ non_existent_id } " ,
227- headers = normal_user_api_key_headers ,
227+ headers = user_api_key_header ,
228228 )
229229
230230 assert response .status_code == 404
@@ -258,27 +258,27 @@ def test_list_assistants_success(
258258
259259def test_list_assistants_invalid_pagination (
260260 client : TestClient ,
261- normal_user_api_key_headers : dict ,
261+ user_api_key_header : dict ,
262262):
263263 """Test assistants list with invalid pagination parameters."""
264264 # Test negative skip
265265 response = client .get (
266266 "/api/v1/assistant/?skip=-1&limit=10" ,
267- headers = normal_user_api_key_headers ,
267+ headers = user_api_key_header ,
268268 )
269269 assert response .status_code == 422
270270
271271 # Test limit too high
272272 response = client .get (
273273 "/api/v1/assistant/?skip=0&limit=101" ,
274- headers = normal_user_api_key_headers ,
274+ headers = user_api_key_header ,
275275 )
276276 assert response .status_code == 422
277277
278278 # Test limit too low
279279 response = client .get (
280280 "/api/v1/assistant/?skip=0&limit=0" ,
281- headers = normal_user_api_key_headers ,
281+ headers = user_api_key_header ,
282282 )
283283 assert response .status_code == 422
284284
@@ -304,14 +304,14 @@ def test_delete_assistant_success(
304304
305305def test_delete_assistant_not_found (
306306 client : TestClient ,
307- normal_user_api_key_headers : dict ,
307+ user_api_key_header : dict ,
308308):
309309 """Test failure when deleting a non-existent assistant."""
310310 non_existent_id = str (uuid4 ())
311311
312312 response = client .delete (
313313 f"/api/v1/assistant/{ non_existent_id } " ,
314- headers = normal_user_api_key_headers ,
314+ headers = user_api_key_header ,
315315 )
316316
317317 assert response .status_code == 404
0 commit comments