9
9
10
10
from tests .utils import assert_matches_type
11
11
from python_intercom import Intercom , AsyncIntercom
12
- from python_intercom .types .shared import PaginatedResponse
12
+ from python_intercom .types .news . newsfeeds import ItemListResponse
13
13
14
14
base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
15
15
@@ -22,15 +22,15 @@ def test_method_list(self, client: Intercom) -> None:
22
22
item = client .news .newsfeeds .items .list (
23
23
id = "123" ,
24
24
)
25
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
25
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
26
26
27
27
@parametrize
28
28
def test_method_list_with_all_params (self , client : Intercom ) -> None :
29
29
item = client .news .newsfeeds .items .list (
30
30
id = "123" ,
31
31
intercom_version = "2.11" ,
32
32
)
33
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
33
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
34
34
35
35
@parametrize
36
36
def test_raw_response_list (self , client : Intercom ) -> None :
@@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Intercom) -> None:
41
41
assert response .is_closed is True
42
42
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
43
43
item = response .parse ()
44
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
44
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
45
45
46
46
@parametrize
47
47
def test_streaming_response_list (self , client : Intercom ) -> None :
@@ -52,7 +52,7 @@ def test_streaming_response_list(self, client: Intercom) -> None:
52
52
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
53
53
54
54
item = response .parse ()
55
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
55
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
56
56
57
57
assert cast (Any , response .is_closed ) is True
58
58
@@ -72,15 +72,15 @@ async def test_method_list(self, async_client: AsyncIntercom) -> None:
72
72
item = await async_client .news .newsfeeds .items .list (
73
73
id = "123" ,
74
74
)
75
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
75
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
76
76
77
77
@parametrize
78
78
async def test_method_list_with_all_params (self , async_client : AsyncIntercom ) -> None :
79
79
item = await async_client .news .newsfeeds .items .list (
80
80
id = "123" ,
81
81
intercom_version = "2.11" ,
82
82
)
83
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
83
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
84
84
85
85
@parametrize
86
86
async def test_raw_response_list (self , async_client : AsyncIntercom ) -> None :
@@ -91,7 +91,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None:
91
91
assert response .is_closed is True
92
92
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
93
93
item = await response .parse ()
94
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
94
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
95
95
96
96
@parametrize
97
97
async def test_streaming_response_list (self , async_client : AsyncIntercom ) -> None :
@@ -102,7 +102,7 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non
102
102
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
103
103
104
104
item = await response .parse ()
105
- assert_matches_type (PaginatedResponse , item , path = ["response" ])
105
+ assert_matches_type (ItemListResponse , item , path = ["response" ])
106
106
107
107
assert cast (Any , response .is_closed ) is True
108
108
0 commit comments