13
13
from finch .pagination import SyncSinglePage , AsyncSinglePage
14
14
from finch .types .hris .benefits import (
15
15
IndividualBenefit ,
16
- IndividualEnrollManyResponse ,
16
+ EnrolledIndividualBenifit ,
17
17
IndividualEnrolledIDsResponse ,
18
+ IndividualUnenrollManyResponse ,
18
19
)
19
20
20
21
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
@@ -28,7 +29,7 @@ def test_method_enroll_many(self, client: Finch) -> None:
28
29
individual = client .hris .benefits .individuals .enroll_many (
29
30
benefit_id = "benefit_id" ,
30
31
)
31
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
32
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
32
33
33
34
@parametrize
34
35
def test_method_enroll_many_with_all_params (self , client : Finch ) -> None :
@@ -54,7 +55,7 @@ def test_method_enroll_many_with_all_params(self, client: Finch) -> None:
54
55
}
55
56
],
56
57
)
57
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
58
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
58
59
59
60
@parametrize
60
61
def test_raw_response_enroll_many (self , client : Finch ) -> None :
@@ -65,7 +66,7 @@ def test_raw_response_enroll_many(self, client: Finch) -> None:
65
66
assert response .is_closed is True
66
67
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
67
68
individual = response .parse ()
68
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
69
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
69
70
70
71
@parametrize
71
72
def test_streaming_response_enroll_many (self , client : Finch ) -> None :
@@ -76,7 +77,7 @@ def test_streaming_response_enroll_many(self, client: Finch) -> None:
76
77
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
77
78
78
79
individual = response .parse ()
79
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
80
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
80
81
81
82
assert cast (Any , response .is_closed ) is True
82
83
@@ -176,15 +177,15 @@ def test_method_unenroll_many(self, client: Finch) -> None:
176
177
individual = client .hris .benefits .individuals .unenroll_many (
177
178
benefit_id = "benefit_id" ,
178
179
)
179
- assert_matches_type (SyncSinglePage [ object ] , individual , path = ["response" ])
180
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
180
181
181
182
@parametrize
182
183
def test_method_unenroll_many_with_all_params (self , client : Finch ) -> None :
183
184
individual = client .hris .benefits .individuals .unenroll_many (
184
185
benefit_id = "benefit_id" ,
185
186
individual_ids = ["string" ],
186
187
)
187
- assert_matches_type (SyncSinglePage [ object ] , individual , path = ["response" ])
188
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
188
189
189
190
@parametrize
190
191
def test_raw_response_unenroll_many (self , client : Finch ) -> None :
@@ -195,7 +196,7 @@ def test_raw_response_unenroll_many(self, client: Finch) -> None:
195
196
assert response .is_closed is True
196
197
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
197
198
individual = response .parse ()
198
- assert_matches_type (SyncSinglePage [ object ] , individual , path = ["response" ])
199
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
199
200
200
201
@parametrize
201
202
def test_streaming_response_unenroll_many (self , client : Finch ) -> None :
@@ -206,7 +207,7 @@ def test_streaming_response_unenroll_many(self, client: Finch) -> None:
206
207
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
207
208
208
209
individual = response .parse ()
209
- assert_matches_type (SyncSinglePage [ object ] , individual , path = ["response" ])
210
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
210
211
211
212
assert cast (Any , response .is_closed ) is True
212
213
@@ -226,7 +227,7 @@ async def test_method_enroll_many(self, async_client: AsyncFinch) -> None:
226
227
individual = await async_client .hris .benefits .individuals .enroll_many (
227
228
benefit_id = "benefit_id" ,
228
229
)
229
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
230
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
230
231
231
232
@parametrize
232
233
async def test_method_enroll_many_with_all_params (self , async_client : AsyncFinch ) -> None :
@@ -252,7 +253,7 @@ async def test_method_enroll_many_with_all_params(self, async_client: AsyncFinch
252
253
}
253
254
],
254
255
)
255
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
256
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
256
257
257
258
@parametrize
258
259
async def test_raw_response_enroll_many (self , async_client : AsyncFinch ) -> None :
@@ -263,7 +264,7 @@ async def test_raw_response_enroll_many(self, async_client: AsyncFinch) -> None:
263
264
assert response .is_closed is True
264
265
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
265
266
individual = response .parse ()
266
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
267
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
267
268
268
269
@parametrize
269
270
async def test_streaming_response_enroll_many (self , async_client : AsyncFinch ) -> None :
@@ -274,7 +275,7 @@ async def test_streaming_response_enroll_many(self, async_client: AsyncFinch) ->
274
275
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
275
276
276
277
individual = await response .parse ()
277
- assert_matches_type (IndividualEnrollManyResponse , individual , path = ["response" ])
278
+ assert_matches_type (EnrolledIndividualBenifit , individual , path = ["response" ])
278
279
279
280
assert cast (Any , response .is_closed ) is True
280
281
@@ -374,15 +375,15 @@ async def test_method_unenroll_many(self, async_client: AsyncFinch) -> None:
374
375
individual = await async_client .hris .benefits .individuals .unenroll_many (
375
376
benefit_id = "benefit_id" ,
376
377
)
377
- assert_matches_type (AsyncSinglePage [ object ] , individual , path = ["response" ])
378
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
378
379
379
380
@parametrize
380
381
async def test_method_unenroll_many_with_all_params (self , async_client : AsyncFinch ) -> None :
381
382
individual = await async_client .hris .benefits .individuals .unenroll_many (
382
383
benefit_id = "benefit_id" ,
383
384
individual_ids = ["string" ],
384
385
)
385
- assert_matches_type (AsyncSinglePage [ object ] , individual , path = ["response" ])
386
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
386
387
387
388
@parametrize
388
389
async def test_raw_response_unenroll_many (self , async_client : AsyncFinch ) -> None :
@@ -393,7 +394,7 @@ async def test_raw_response_unenroll_many(self, async_client: AsyncFinch) -> Non
393
394
assert response .is_closed is True
394
395
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
395
396
individual = response .parse ()
396
- assert_matches_type (AsyncSinglePage [ object ] , individual , path = ["response" ])
397
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
397
398
398
399
@parametrize
399
400
async def test_streaming_response_unenroll_many (self , async_client : AsyncFinch ) -> None :
@@ -404,7 +405,7 @@ async def test_streaming_response_unenroll_many(self, async_client: AsyncFinch)
404
405
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
405
406
406
407
individual = await response .parse ()
407
- assert_matches_type (AsyncSinglePage [ object ] , individual , path = ["response" ])
408
+ assert_matches_type (IndividualUnenrollManyResponse , individual , path = ["response" ])
408
409
409
410
assert cast (Any , response .is_closed ) is True
410
411
0 commit comments