1010from finch import Finch , AsyncFinch
1111from tests .utils import assert_matches_type
1212from finch .types .connect import (
13- SessionConnectResponse ,
13+ SessionNewResponse ,
1414 SessionReauthenticateResponse ,
1515)
1616
@@ -22,18 +22,18 @@ class TestSessions:
2222
2323 @pytest .mark .skip (reason = "prism tests are broken" )
2424 @parametrize
25- def test_method_connect (self , client : Finch ) -> None :
26- session = client .connect .sessions .connect (
25+ def test_method_new (self , client : Finch ) -> None :
26+ session = client .connect .sessions .new (
2727 customer_id = "x" ,
2828 customer_name = "x" ,
2929 products = ["benefits" ],
3030 )
31- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
31+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
3232
3333 @pytest .mark .skip (reason = "prism tests are broken" )
3434 @parametrize
35- def test_method_connect_with_all_params (self , client : Finch ) -> None :
36- session = client .connect .sessions .connect (
35+ def test_method_new_with_all_params (self , client : Finch ) -> None :
36+ session = client .connect .sessions .new (
3737 customer_id = "x" ,
3838 customer_name = "x" ,
3939 products = ["benefits" ],
@@ -47,12 +47,12 @@ def test_method_connect_with_all_params(self, client: Finch) -> None:
4747 redirect_uri = "redirect_uri" ,
4848 sandbox = "finch" ,
4949 )
50- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
50+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
5151
5252 @pytest .mark .skip (reason = "prism tests are broken" )
5353 @parametrize
54- def test_raw_response_connect (self , client : Finch ) -> None :
55- response = client .connect .sessions .with_raw_response .connect (
54+ def test_raw_response_new (self , client : Finch ) -> None :
55+ response = client .connect .sessions .with_raw_response .new (
5656 customer_id = "x" ,
5757 customer_name = "x" ,
5858 products = ["benefits" ],
@@ -61,12 +61,12 @@ def test_raw_response_connect(self, client: Finch) -> None:
6161 assert response .is_closed is True
6262 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
6363 session = response .parse ()
64- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
64+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
6565
6666 @pytest .mark .skip (reason = "prism tests are broken" )
6767 @parametrize
68- def test_streaming_response_connect (self , client : Finch ) -> None :
69- with client .connect .sessions .with_streaming_response .connect (
68+ def test_streaming_response_new (self , client : Finch ) -> None :
69+ with client .connect .sessions .with_streaming_response .new (
7070 customer_id = "x" ,
7171 customer_name = "x" ,
7272 products = ["benefits" ],
@@ -75,7 +75,7 @@ def test_streaming_response_connect(self, client: Finch) -> None:
7575 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
7676
7777 session = response .parse ()
78- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
78+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
7979
8080 assert cast (Any , response .is_closed ) is True
8181
@@ -132,18 +132,18 @@ class TestAsyncSessions:
132132
133133 @pytest .mark .skip (reason = "prism tests are broken" )
134134 @parametrize
135- async def test_method_connect (self , async_client : AsyncFinch ) -> None :
136- session = await async_client .connect .sessions .connect (
135+ async def test_method_new (self , async_client : AsyncFinch ) -> None :
136+ session = await async_client .connect .sessions .new (
137137 customer_id = "x" ,
138138 customer_name = "x" ,
139139 products = ["benefits" ],
140140 )
141- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
141+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
142142
143143 @pytest .mark .skip (reason = "prism tests are broken" )
144144 @parametrize
145- async def test_method_connect_with_all_params (self , async_client : AsyncFinch ) -> None :
146- session = await async_client .connect .sessions .connect (
145+ async def test_method_new_with_all_params (self , async_client : AsyncFinch ) -> None :
146+ session = await async_client .connect .sessions .new (
147147 customer_id = "x" ,
148148 customer_name = "x" ,
149149 products = ["benefits" ],
@@ -157,12 +157,12 @@ async def test_method_connect_with_all_params(self, async_client: AsyncFinch) ->
157157 redirect_uri = "redirect_uri" ,
158158 sandbox = "finch" ,
159159 )
160- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
160+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
161161
162162 @pytest .mark .skip (reason = "prism tests are broken" )
163163 @parametrize
164- async def test_raw_response_connect (self , async_client : AsyncFinch ) -> None :
165- response = await async_client .connect .sessions .with_raw_response .connect (
164+ async def test_raw_response_new (self , async_client : AsyncFinch ) -> None :
165+ response = await async_client .connect .sessions .with_raw_response .new (
166166 customer_id = "x" ,
167167 customer_name = "x" ,
168168 products = ["benefits" ],
@@ -171,12 +171,12 @@ async def test_raw_response_connect(self, async_client: AsyncFinch) -> None:
171171 assert response .is_closed is True
172172 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
173173 session = response .parse ()
174- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
174+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
175175
176176 @pytest .mark .skip (reason = "prism tests are broken" )
177177 @parametrize
178- async def test_streaming_response_connect (self , async_client : AsyncFinch ) -> None :
179- async with async_client .connect .sessions .with_streaming_response .connect (
178+ async def test_streaming_response_new (self , async_client : AsyncFinch ) -> None :
179+ async with async_client .connect .sessions .with_streaming_response .new (
180180 customer_id = "x" ,
181181 customer_name = "x" ,
182182 products = ["benefits" ],
@@ -185,7 +185,7 @@ async def test_streaming_response_connect(self, async_client: AsyncFinch) -> Non
185185 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
186186
187187 session = await response .parse ()
188- assert_matches_type (SessionConnectResponse , session , path = ["response" ])
188+ assert_matches_type (SessionNewResponse , session , path = ["response" ])
189189
190190 assert cast (Any , response .is_closed ) is True
191191
0 commit comments