mirror of
https://github.com/httpie/cli.git
synced 2025-08-19 05:26:38 +02:00
Uniformize UTF-8 naming (#1115)
* Uniformize UTF-8 naming
Replace `utf8` -> `utf-8` everywhere.
It should have no impact, `utf8` is an alias of `utf-8` [1].
[1] ee03bad25e/Lib/encodings/aliases.py (L534)
* Always specify the encoding
Let's be explicit over implicit. And prevent future warnings from PEP-597 [1].
[1] https://www.python.org/dev/peps/pep-0597/#using-the-default-encoding-is-a-common-mistake
* Update `UTF8` constant (`utf-8` -> `utf_8`)
* Remove default argument from `str.encode()` and `bytes.decode()`
* Clean-up
This commit is contained in:
committed by
GitHub
parent
11399dde76
commit
c6cbc7dfa5
@@ -247,10 +247,10 @@ class TestRequestBodyFromFilePath:
|
||||
self, httpbin):
|
||||
r = http('--verbose',
|
||||
'POST', httpbin.url + '/post', '@' + FILE_PATH_ARG,
|
||||
'Content-Type:text/plain; charset=utf8')
|
||||
'Content-Type:text/plain; charset=UTF-8')
|
||||
assert HTTP_OK in r
|
||||
assert FILE_CONTENT in r
|
||||
assert 'Content-Type: text/plain; charset=utf8' in r
|
||||
assert 'Content-Type: text/plain; charset=UTF-8' in r
|
||||
|
||||
def test_request_body_from_file_by_path_no_field_name_allowed(
|
||||
self, httpbin):
|
||||
|
Reference in New Issue
Block a user