9
9
10
10
from openlayer import Openlayer , AsyncOpenlayer
11
11
from tests .utils import assert_matches_type
12
- from openlayer .types .inference_pipelines import RowStreamResponse
12
+ from openlayer .types .inference_pipelines import RowUpdateResponse
13
13
14
14
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
15
15
@@ -18,17 +18,17 @@ class TestRows:
18
18
parametrize = pytest .mark .parametrize ("client" , [False , True ], indirect = True , ids = ["loose" , "strict" ])
19
19
20
20
@parametrize
21
- def test_method_stream (self , client : Openlayer ) -> None :
22
- row = client .inference_pipelines .rows .stream (
21
+ def test_method_update (self , client : Openlayer ) -> None :
22
+ row = client .inference_pipelines .rows .update (
23
23
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
24
24
inference_id = "inferenceId" ,
25
25
row = {},
26
26
)
27
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
27
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
28
28
29
29
@parametrize
30
- def test_method_stream_with_all_params (self , client : Openlayer ) -> None :
31
- row = client .inference_pipelines .rows .stream (
30
+ def test_method_update_with_all_params (self , client : Openlayer ) -> None :
31
+ row = client .inference_pipelines .rows .update (
32
32
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
33
33
inference_id = "inferenceId" ,
34
34
row = {},
@@ -40,11 +40,11 @@ def test_method_stream_with_all_params(self, client: Openlayer) -> None:
40
40
"human_feedback_column_name" : "human_feedback" ,
41
41
},
42
42
)
43
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
43
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
44
44
45
45
@parametrize
46
- def test_raw_response_stream (self , client : Openlayer ) -> None :
47
- response = client .inference_pipelines .rows .with_raw_response .stream (
46
+ def test_raw_response_update (self , client : Openlayer ) -> None :
47
+ response = client .inference_pipelines .rows .with_raw_response .update (
48
48
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
49
49
inference_id = "inferenceId" ,
50
50
row = {},
@@ -53,11 +53,11 @@ def test_raw_response_stream(self, client: Openlayer) -> None:
53
53
assert response .is_closed is True
54
54
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
55
55
row = response .parse ()
56
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
56
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
57
57
58
58
@parametrize
59
- def test_streaming_response_stream (self , client : Openlayer ) -> None :
60
- with client .inference_pipelines .rows .with_streaming_response .stream (
59
+ def test_streaming_response_update (self , client : Openlayer ) -> None :
60
+ with client .inference_pipelines .rows .with_streaming_response .update (
61
61
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
62
62
inference_id = "inferenceId" ,
63
63
row = {},
@@ -66,14 +66,14 @@ def test_streaming_response_stream(self, client: Openlayer) -> None:
66
66
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
67
67
68
68
row = response .parse ()
69
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
69
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
70
70
71
71
assert cast (Any , response .is_closed ) is True
72
72
73
73
@parametrize
74
- def test_path_params_stream (self , client : Openlayer ) -> None :
74
+ def test_path_params_update (self , client : Openlayer ) -> None :
75
75
with pytest .raises (ValueError , match = r"Expected a non-empty value for `inference_pipeline_id` but received ''" ):
76
- client .inference_pipelines .rows .with_raw_response .stream (
76
+ client .inference_pipelines .rows .with_raw_response .update (
77
77
inference_pipeline_id = "" ,
78
78
inference_id = "inferenceId" ,
79
79
row = {},
@@ -84,17 +84,17 @@ class TestAsyncRows:
84
84
parametrize = pytest .mark .parametrize ("async_client" , [False , True ], indirect = True , ids = ["loose" , "strict" ])
85
85
86
86
@parametrize
87
- async def test_method_stream (self , async_client : AsyncOpenlayer ) -> None :
88
- row = await async_client .inference_pipelines .rows .stream (
87
+ async def test_method_update (self , async_client : AsyncOpenlayer ) -> None :
88
+ row = await async_client .inference_pipelines .rows .update (
89
89
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
90
90
inference_id = "inferenceId" ,
91
91
row = {},
92
92
)
93
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
93
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
94
94
95
95
@parametrize
96
- async def test_method_stream_with_all_params (self , async_client : AsyncOpenlayer ) -> None :
97
- row = await async_client .inference_pipelines .rows .stream (
96
+ async def test_method_update_with_all_params (self , async_client : AsyncOpenlayer ) -> None :
97
+ row = await async_client .inference_pipelines .rows .update (
98
98
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
99
99
inference_id = "inferenceId" ,
100
100
row = {},
@@ -106,11 +106,11 @@ async def test_method_stream_with_all_params(self, async_client: AsyncOpenlayer)
106
106
"human_feedback_column_name" : "human_feedback" ,
107
107
},
108
108
)
109
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
109
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
110
110
111
111
@parametrize
112
- async def test_raw_response_stream (self , async_client : AsyncOpenlayer ) -> None :
113
- response = await async_client .inference_pipelines .rows .with_raw_response .stream (
112
+ async def test_raw_response_update (self , async_client : AsyncOpenlayer ) -> None :
113
+ response = await async_client .inference_pipelines .rows .with_raw_response .update (
114
114
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
115
115
inference_id = "inferenceId" ,
116
116
row = {},
@@ -119,11 +119,11 @@ async def test_raw_response_stream(self, async_client: AsyncOpenlayer) -> None:
119
119
assert response .is_closed is True
120
120
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
121
121
row = await response .parse ()
122
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
122
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
123
123
124
124
@parametrize
125
- async def test_streaming_response_stream (self , async_client : AsyncOpenlayer ) -> None :
126
- async with async_client .inference_pipelines .rows .with_streaming_response .stream (
125
+ async def test_streaming_response_update (self , async_client : AsyncOpenlayer ) -> None :
126
+ async with async_client .inference_pipelines .rows .with_streaming_response .update (
127
127
inference_pipeline_id = "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" ,
128
128
inference_id = "inferenceId" ,
129
129
row = {},
@@ -132,14 +132,14 @@ async def test_streaming_response_stream(self, async_client: AsyncOpenlayer) ->
132
132
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
133
133
134
134
row = await response .parse ()
135
- assert_matches_type (RowStreamResponse , row , path = ["response" ])
135
+ assert_matches_type (RowUpdateResponse , row , path = ["response" ])
136
136
137
137
assert cast (Any , response .is_closed ) is True
138
138
139
139
@parametrize
140
- async def test_path_params_stream (self , async_client : AsyncOpenlayer ) -> None :
140
+ async def test_path_params_update (self , async_client : AsyncOpenlayer ) -> None :
141
141
with pytest .raises (ValueError , match = r"Expected a non-empty value for `inference_pipeline_id` but received ''" ):
142
- await async_client .inference_pipelines .rows .with_raw_response .stream (
142
+ await async_client .inference_pipelines .rows .with_raw_response .update (
143
143
inference_pipeline_id = "" ,
144
144
inference_id = "inferenceId" ,
145
145
row = {},
0 commit comments