Mickaël Schoentgen
c6cbc7dfa5
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
2021-08-05 20:58:43 +02:00
Mickaël Schoentgen
a66af2497a
Add converter plugin streaming tests ( #1117 )
...
Also fixed minor glitches here and there and re-enabled a unicode test.
2021-08-05 14:37:08 +02:00
Mickaël Schoentgen
464b5b4c1d
Polish Python 2 removal ( #1070 )
2021-05-27 13:05:41 +02:00
Mickaël Schoentgen
264d45cdf5
Modernize the code base with f-strings in tests ( #1069 )
...
Simple concatenations were kept for readability purpose.
2021-05-26 14:09:38 +02:00
Mickaël Schoentgen
0001297f41
Add --raw to allow specifying the raw request body as an alternative to stdin ( #1062 )
...
* Add --raw to allow specifying the raw request body without extra processing
As an alternative to `stdin`.
Co-authored-by: Elena Lape <elapinskaite@gmail.com>
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
* Update README.rst
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
* Update README.rst
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
* Fix default HTTP method on empty data
Co-authored-by: Elena Lape <elapinskaite@gmail.com>
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-05-24 14:29:54 +02:00
Mickaël Schoentgen
a3a08a9a22
Use relative imports ( #1057 )
...
* Use relative imports in test
* Use relative imports
* Add myself to contributors :)
2021-05-05 14:13:39 +02:00
Jakub Roztocil
4e574e6b8e
Cleanup tests
2016-03-03 18:50:18 +08:00
Jakub Roztocil
2a72ae23d5
Run tests against local httpbin instance via pytest-httpbin.
2014-06-28 16:38:41 +02:00
Jakub Roztocil
8e170b059c
Fixed tests.
2014-06-03 19:45:57 +02:00
Jakub Roztocil
e4c68063b9
Converted built-in formatters to formatter plugins.
...
Still work in progress and the API should be considered private for now.
2014-05-12 19:12:39 +02:00
Jakub Roztocil
2aa53e4be3
Avoid “__init__.py” files in test directories.
...
As recommended here:
https://pytest.org/latest/goodpractises.html
2014-04-28 11:29:41 +02:00
Jakub Roztocil
1169a3eb23
Fixed tests.
2014-04-26 20:14:46 +02:00
Jakub Roztocil
43bc6d0c98
Fixed and added tests for --verbose with unicode headers.
2014-04-26 20:10:15 +02:00
Jakub Roztocil
eca1ffaedb
More unicode.
2014-04-26 19:47:14 +02:00
Jakub Roztocil
0bd218eab0
Cleanup
2014-04-26 19:32:08 +02:00
Jakub Roztocil
84a521a827
Added test_unicode_url_query_arg_item.
2014-04-26 18:23:13 +02:00
Jakub Roztocil
467d126b6c
Python 3 unicode fixes.
2014-04-26 17:35:26 +02:00
Jakub Roztocil
15e62ad26d
Implemented more robust unicode handling.
...
* Immediatelly convert all args from `bytes` to `str`.
* Added `Environment.stdin_encoding` and `Environment.stdout_encoding`
* Allow unicode characters in HTTP headers and basic auth credentials
by encoding them using UTF8 instead of latin1 (#212 ).
2014-04-26 15:07:31 +02:00