@@ -147,3 +147,33 @@ async def test_issue_560_bool_in_params_async(self):
147147 await self .async_client .conversations_list (exclude_archived = 1 ) # ok
148148 await self .async_client .conversations_list (exclude_archived = "true" ) # ok
149149 await self .async_client .conversations_list (exclude_archived = True ) # TypeError
150+
151+ def test_issue_690_oauth_v2_access (self ):
152+ self .client .token = ""
153+ resp = self .client .oauth_v2_access (client_id = "111.222" , client_secret = "secret" , code = "codeeeeeeeeee" )
154+ self .assertIsNone (resp ["error" ])
155+ with self .assertRaises (err .SlackApiError ):
156+ self .client .oauth_v2_access (client_id = "999.999" , client_secret = "secret" , code = "codeeeeeeeeee" )
157+
158+ @async_test
159+ async def test_issue_690_oauth_v2_access_async (self ):
160+ self .async_client .token = ""
161+ resp = await self .async_client .oauth_v2_access (client_id = "111.222" , client_secret = "secret" , code = "codeeeeeeeeee" )
162+ self .assertIsNone (resp ["error" ])
163+ with self .assertRaises (err .SlackApiError ):
164+ await self .async_client .oauth_v2_access (client_id = "999.999" , client_secret = "secret" , code = "codeeeeeeeeee" )
165+
166+ def test_issue_690_oauth_access (self ):
167+ self .client .token = ""
168+ resp = self .client .oauth_access (client_id = "111.222" , client_secret = "secret" , code = "codeeeeeeeeee" )
169+ self .assertIsNone (resp ["error" ])
170+ with self .assertRaises (err .SlackApiError ):
171+ self .client .oauth_access (client_id = "999.999" , client_secret = "secret" , code = "codeeeeeeeeee" )
172+
173+ @async_test
174+ async def test_issue_690_oauth_access_async (self ):
175+ self .async_client .token = ""
176+ resp = await self .async_client .oauth_access (client_id = "111.222" , client_secret = "secret" , code = "codeeeeeeeeee" )
177+ self .assertIsNone (resp ["error" ])
178+ with self .assertRaises (err .SlackApiError ):
179+ await self .async_client .oauth_access (client_id = "999.999" , client_secret = "secret" , code = "codeeeeeeeeee" )
0 commit comments