Update async unit tests to use unittest.IsolatedAsyncioTestCase base classes
Currently unit tests employ a helper async_test method defined in in order to run async tests.
As of v3.8, the unittest module supports a base class IsolatedAsyncioTestCase with a similar API to TestCase, but which also accepts coroutines as test functions. We can update unit test implementations to use this instead of TestCase around the time we decide to support the later version of Python as well.
Todo: For test suites where async_test (typically this is used in the decorator pattern i.e. @async_test) is used, replace TestCase with IsolatedAsyncioTestCase and remove decorator method usage.
Category (place an x in each of the [ ])
- [x] slack_sdk.web.WebClient (sync/async) (Web API client)
- [x] slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
- [ ] slack_sdk.models (UI component builders)
- [ ] slack_sdk.oauth (OAuth Flow Utilities)
- [ ] slack_sdk.socket_mode (Socket Mode client)
- [ ] slack_sdk.audit_logs (Audit Logs API client)
- [ ] slack_sdk.scim (SCIM API client)
- [ ] slack_sdk.rtm (RTM client)
- [ ] slack_sdk.signature (Request Signature Verifier)
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
@srajiang Thanks for creating the issue! I agree that we can use the base class in the future 👍 However, as we haven't decided when to drop supporting 3.6 / 3.7 (I'm sure that we will continue supporting them at least for one year, probably for years), let's remove the "good first issue" label from this issue at the moment.