Fix #1377 Add unit tests for #1367 changes#1378
Merged
seratch merged 4 commits intoslackapi:mainfrom May 29, 2023
Merged
Conversation
seratch
commented
May 29, 2023
| ) | ||
| except aiohttp.ContentTypeError: | ||
| logger.debug(f"No response data returned from the following API call: {api_url}.") | ||
| retry_response = RetryHttpResponse( |
| if self.status_code == 200 and self.data and (isinstance(self.data, bytes) or self.data.get("ok", False)): | ||
| return self | ||
| msg = f"The request to the Slack API failed. (url: {self.api_url})" | ||
| msg = f"The request to the Slack API failed. (url: {self.api_url}, status: {self.status_code})" |
Contributor
Author
There was a problem hiding this comment.
for better debuggability
| await client.auth_test() | ||
|
|
||
| @async_test | ||
| async def test_retries(self): |
Contributor
Author
There was a problem hiding this comment.
Moved from tests/slack_sdk_async/web/test_web_client_http_retry.py to reduce confusion for future maintainers
| request: HttpRequest, | ||
| response: Optional[HttpResponse], | ||
| error: Optional[Exception], | ||
| response: Optional[HttpResponse] = None, |
Codecov Report
@@ Coverage Diff @@
## main #1378 +/- ##
==========================================
+ Coverage 85.56% 85.57% +0.01%
==========================================
Files 111 111
Lines 11582 11586 +4
==========================================
+ Hits 9910 9915 +5
+ Misses 1672 1671 -1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request resolves #1377
Category (place an
xin each of the[ ])/docs-src(Documents, have you run./scripts/docs.sh?)/docs-src-v2(Documents, have you run./scripts/docs-v2.sh?)/tutorial(PythOnBoardingBot tutorial)tests/integration_tests(Automated tests for this library)Requirements (place an
xin each[ ])python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.shafter making the changes.