15
15
EntryNotifySmeResponse ,
16
16
)
17
17
18
+ # pyright: reportDeprecated=false
19
+
18
20
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
19
21
20
22
@@ -382,40 +384,45 @@ def test_path_params_publish_draft_answer(self, client: Codex) -> None:
382
384
@pytest .mark .skip ()
383
385
@parametrize
384
386
def test_method_query (self , client : Codex ) -> None :
385
- entry = client .projects .entries .query (
386
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
387
- question = "question" ,
388
- )
387
+ with pytest .warns (DeprecationWarning ):
388
+ entry = client .projects .entries .query (
389
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
390
+ question = "question" ,
391
+ )
392
+
389
393
assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
390
394
391
395
@pytest .mark .skip ()
392
396
@parametrize
393
397
def test_method_query_with_all_params (self , client : Codex ) -> None :
394
- entry = client .projects .entries .query (
395
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
396
- question = "question" ,
397
- use_llm_matching = True ,
398
- client_metadata = {},
399
- query_metadata = {
400
- "context" : "string" ,
401
- "custom_metadata" : {},
402
- "eval_scores" : {"foo" : 0 },
403
- "evaluated_response" : "evaluated_response" ,
404
- },
405
- x_client_library_version = "x-client-library-version" ,
406
- x_integration_type = "x-integration-type" ,
407
- x_source = "x-source" ,
408
- x_stainless_package_version = "x-stainless-package-version" ,
409
- )
398
+ with pytest .warns (DeprecationWarning ):
399
+ entry = client .projects .entries .query (
400
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
401
+ question = "question" ,
402
+ use_llm_matching = True ,
403
+ client_metadata = {},
404
+ query_metadata = {
405
+ "context" : "string" ,
406
+ "custom_metadata" : {},
407
+ "eval_scores" : {"foo" : 0 },
408
+ "evaluated_response" : "evaluated_response" ,
409
+ },
410
+ x_client_library_version = "x-client-library-version" ,
411
+ x_integration_type = "x-integration-type" ,
412
+ x_source = "x-source" ,
413
+ x_stainless_package_version = "x-stainless-package-version" ,
414
+ )
415
+
410
416
assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
411
417
412
418
@pytest .mark .skip ()
413
419
@parametrize
414
420
def test_raw_response_query (self , client : Codex ) -> None :
415
- response = client .projects .entries .with_raw_response .query (
416
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
417
- question = "question" ,
418
- )
421
+ with pytest .warns (DeprecationWarning ):
422
+ response = client .projects .entries .with_raw_response .query (
423
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
424
+ question = "question" ,
425
+ )
419
426
420
427
assert response .is_closed is True
421
428
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -425,26 +432,28 @@ def test_raw_response_query(self, client: Codex) -> None:
425
432
@pytest .mark .skip ()
426
433
@parametrize
427
434
def test_streaming_response_query (self , client : Codex ) -> None :
428
- with client .projects .entries .with_streaming_response .query (
429
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
430
- question = "question" ,
431
- ) as response :
432
- assert not response .is_closed
433
- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
435
+ with pytest .warns (DeprecationWarning ):
436
+ with client .projects .entries .with_streaming_response .query (
437
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
438
+ question = "question" ,
439
+ ) as response :
440
+ assert not response .is_closed
441
+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
434
442
435
- entry = response .parse ()
436
- assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
443
+ entry = response .parse ()
444
+ assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
437
445
438
446
assert cast (Any , response .is_closed ) is True
439
447
440
448
@pytest .mark .skip ()
441
449
@parametrize
442
450
def test_path_params_query (self , client : Codex ) -> None :
443
- with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
444
- client .projects .entries .with_raw_response .query (
445
- project_id = "" ,
446
- question = "question" ,
447
- )
451
+ with pytest .warns (DeprecationWarning ):
452
+ with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
453
+ client .projects .entries .with_raw_response .query (
454
+ project_id = "" ,
455
+ question = "question" ,
456
+ )
448
457
449
458
@pytest .mark .skip ()
450
459
@parametrize
@@ -863,40 +872,45 @@ async def test_path_params_publish_draft_answer(self, async_client: AsyncCodex)
863
872
@pytest .mark .skip ()
864
873
@parametrize
865
874
async def test_method_query (self , async_client : AsyncCodex ) -> None :
866
- entry = await async_client .projects .entries .query (
867
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
868
- question = "question" ,
869
- )
875
+ with pytest .warns (DeprecationWarning ):
876
+ entry = await async_client .projects .entries .query (
877
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
878
+ question = "question" ,
879
+ )
880
+
870
881
assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
871
882
872
883
@pytest .mark .skip ()
873
884
@parametrize
874
885
async def test_method_query_with_all_params (self , async_client : AsyncCodex ) -> None :
875
- entry = await async_client .projects .entries .query (
876
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
877
- question = "question" ,
878
- use_llm_matching = True ,
879
- client_metadata = {},
880
- query_metadata = {
881
- "context" : "string" ,
882
- "custom_metadata" : {},
883
- "eval_scores" : {"foo" : 0 },
884
- "evaluated_response" : "evaluated_response" ,
885
- },
886
- x_client_library_version = "x-client-library-version" ,
887
- x_integration_type = "x-integration-type" ,
888
- x_source = "x-source" ,
889
- x_stainless_package_version = "x-stainless-package-version" ,
890
- )
886
+ with pytest .warns (DeprecationWarning ):
887
+ entry = await async_client .projects .entries .query (
888
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
889
+ question = "question" ,
890
+ use_llm_matching = True ,
891
+ client_metadata = {},
892
+ query_metadata = {
893
+ "context" : "string" ,
894
+ "custom_metadata" : {},
895
+ "eval_scores" : {"foo" : 0 },
896
+ "evaluated_response" : "evaluated_response" ,
897
+ },
898
+ x_client_library_version = "x-client-library-version" ,
899
+ x_integration_type = "x-integration-type" ,
900
+ x_source = "x-source" ,
901
+ x_stainless_package_version = "x-stainless-package-version" ,
902
+ )
903
+
891
904
assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
892
905
893
906
@pytest .mark .skip ()
894
907
@parametrize
895
908
async def test_raw_response_query (self , async_client : AsyncCodex ) -> None :
896
- response = await async_client .projects .entries .with_raw_response .query (
897
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
898
- question = "question" ,
899
- )
909
+ with pytest .warns (DeprecationWarning ):
910
+ response = await async_client .projects .entries .with_raw_response .query (
911
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
912
+ question = "question" ,
913
+ )
900
914
901
915
assert response .is_closed is True
902
916
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -906,26 +920,28 @@ async def test_raw_response_query(self, async_client: AsyncCodex) -> None:
906
920
@pytest .mark .skip ()
907
921
@parametrize
908
922
async def test_streaming_response_query (self , async_client : AsyncCodex ) -> None :
909
- async with async_client .projects .entries .with_streaming_response .query (
910
- project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
911
- question = "question" ,
912
- ) as response :
913
- assert not response .is_closed
914
- assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
923
+ with pytest .warns (DeprecationWarning ):
924
+ async with async_client .projects .entries .with_streaming_response .query (
925
+ project_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
926
+ question = "question" ,
927
+ ) as response :
928
+ assert not response .is_closed
929
+ assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
915
930
916
- entry = await response .parse ()
917
- assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
931
+ entry = await response .parse ()
932
+ assert_matches_type (EntryQueryResponse , entry , path = ["response" ])
918
933
919
934
assert cast (Any , response .is_closed ) is True
920
935
921
936
@pytest .mark .skip ()
922
937
@parametrize
923
938
async def test_path_params_query (self , async_client : AsyncCodex ) -> None :
924
- with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
925
- await async_client .projects .entries .with_raw_response .query (
926
- project_id = "" ,
927
- question = "question" ,
928
- )
939
+ with pytest .warns (DeprecationWarning ):
940
+ with pytest .raises (ValueError , match = r"Expected a non-empty value for `project_id` but received ''" ):
941
+ await async_client .projects .entries .with_raw_response .query (
942
+ project_id = "" ,
943
+ question = "question" ,
944
+ )
929
945
930
946
@pytest .mark .skip ()
931
947
@parametrize
0 commit comments