Repository navigation
Support responses like HTTP/1.1 404 öööööööö
#3385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -987,6 +987,15 @@ def test_response_decode_unicode(self): | |
| chunks = r.iter_content(decode_unicode=True) | ||
| assert all(isinstance(chunk, str) for chunk in chunks) | ||
|
|
||
| def test_response_reason_unicode(self): | ||
| # check for unicode HTTP status | ||
| r = requests.Response() | ||
| r.url = u'unicode URL' | ||
| r.reason = u'Komponenttia ei löydy'.encode('utf-8') | ||
| r.status_code = 404 | ||
| r.encoding = None | ||
| assert not r.ok # old behaviour - crashes here | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd still like this to be its own test, please. =)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Lukasa done and updated PR |
||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you move this to a new test, please? |
||
| def test_response_chunk_size_type(self): | ||
| """Ensure that chunk_size is passed as None or an integer, otherwise | ||
| raise a TypeError. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did officially drop 3.2 support, right? I know we stopped running the tests, but we were supporting it regardless before this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dropped it like it was hot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sigmavirus24 I can add six.u for it.