@@ -21,25 +21,23 @@ class TestAccessTokens:
21
21
def test_method_create (self , client : Finch ) -> None :
22
22
access_token = client .access_tokens .create (
23
23
code = "<your_authorization_code>" ,
24
- redirect_uri = "https://example.com" ,
25
24
)
26
25
assert_matches_type (CreateAccessTokenResponse , access_token , path = ["response" ])
27
26
28
27
@parametrize
29
28
def test_method_create_with_all_params (self , client : Finch ) -> None :
30
29
access_token = client .access_tokens .create (
31
30
code = "<your_authorization_code>" ,
32
- redirect_uri = "https://example.com" ,
33
31
client_id = "<your_client_id>" ,
34
32
client_secret = "<your_client_secret>" ,
33
+ redirect_uri = "https://example.com" ,
35
34
)
36
35
assert_matches_type (CreateAccessTokenResponse , access_token , path = ["response" ])
37
36
38
37
@parametrize
39
38
def test_raw_response_create (self , client : Finch ) -> None :
40
39
response = client .access_tokens .with_raw_response .create (
41
40
code = "<your_authorization_code>" ,
42
- redirect_uri = "https://example.com" ,
43
41
)
44
42
45
43
assert response .is_closed is True
@@ -51,7 +49,6 @@ def test_raw_response_create(self, client: Finch) -> None:
51
49
def test_streaming_response_create (self , client : Finch ) -> None :
52
50
with client .access_tokens .with_streaming_response .create (
53
51
code = "<your_authorization_code>" ,
54
- redirect_uri = "https://example.com" ,
55
52
) as response :
56
53
assert not response .is_closed
57
54
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
@@ -69,25 +66,23 @@ class TestAsyncAccessTokens:
69
66
async def test_method_create (self , async_client : AsyncFinch ) -> None :
70
67
access_token = await async_client .access_tokens .create (
71
68
code = "<your_authorization_code>" ,
72
- redirect_uri = "https://example.com" ,
73
69
)
74
70
assert_matches_type (CreateAccessTokenResponse , access_token , path = ["response" ])
75
71
76
72
@parametrize
77
73
async def test_method_create_with_all_params (self , async_client : AsyncFinch ) -> None :
78
74
access_token = await async_client .access_tokens .create (
79
75
code = "<your_authorization_code>" ,
80
- redirect_uri = "https://example.com" ,
81
76
client_id = "<your_client_id>" ,
82
77
client_secret = "<your_client_secret>" ,
78
+ redirect_uri = "https://example.com" ,
83
79
)
84
80
assert_matches_type (CreateAccessTokenResponse , access_token , path = ["response" ])
85
81
86
82
@parametrize
87
83
async def test_raw_response_create (self , async_client : AsyncFinch ) -> None :
88
84
response = await async_client .access_tokens .with_raw_response .create (
89
85
code = "<your_authorization_code>" ,
90
- redirect_uri = "https://example.com" ,
91
86
)
92
87
93
88
assert response .is_closed is True
@@ -99,7 +94,6 @@ async def test_raw_response_create(self, async_client: AsyncFinch) -> None:
99
94
async def test_streaming_response_create (self , async_client : AsyncFinch ) -> None :
100
95
async with async_client .access_tokens .with_streaming_response .create (
101
96
code = "<your_authorization_code>" ,
102
- redirect_uri = "https://example.com" ,
103
97
) as response :
104
98
assert not response .is_closed
105
99
assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
0 commit comments