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