httpie-cli/tests
Mickaël Schoentgen 4f1c9441c5
Fix encoding error with non-prettified encoded responses (#1168)
* Fix encoding error with non-prettified encoded responses

Removed `--format-option response.as` an promote `--response-as`: using
the format option would be misleading as it is now also used by non-prettified
responses.

* Encoding refactoring

* split --response-as into --response-mime and --response-charset
* add support for Content-Type charset for requests printed to terminal
* add support charset detection for requests printed to terminal without a Content-Type charset
* etc.

* `test_unicode.py` → `test_encoding.py`

* Drop sequence length check

* Clean-up tests

* [skip ci] Tweaks

* Use the compatible release clause for `charset_normalizer` requirement

Cf. https://www.python.org/dev/peps/pep-0440/#version-specifiers

* Clean-up

* Partially revert d52a4833e4

* Changelog

* Tweak tests

* [skip ci] Better test name

* Cleanup tests and add request body charset detection

* More test suite cleanups

* Cleanup

* Fix code style in test

* Improve detect_encoding() docstring

* Uniformize pytest.mark.parametrize() calls

* [skip ci] Comment out TODOs (will be tackled in a specific PR)

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-10-06 17:27:07 +02:00
..
client_certs Quieten ssl tests (#952) 2020-08-06 22:24:03 +02:00
fixtures Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
utils Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
__init__.py Use relative imports (#1057) 2021-05-05 14:13:39 +02:00
conftest.py Add workflow to test with pyOpenSSL active (#1164) 2021-09-23 10:37:23 +02:00
README.md Switch from reStructuredText to Markdown and add docs/ (#1139) 2021-09-06 17:36:13 +02:00
test_auth_plugins.py Modernize the code base with f-strings in tests (#1069) 2021-05-26 14:09:38 +02:00
test_auth.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_binary.py Remove trailing comma in test 2021-09-24 10:37:59 +02:00
test_cli.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_compress.py Add --raw to allow specifying the raw request body as an alternative to stdin (#1062) 2021-05-24 14:29:54 +02:00
test_config.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_cookie.py Add internal support for file-like object responses to improve adapter plugin support (#1094) 2021-07-06 21:00:06 +02:00
test_defaults.py Add --raw to allow specifying the raw request body as an alternative to stdin (#1062) 2021-05-24 14:29:54 +02:00
test_downloads.py Uniformize UTF-8 naming (#1115) 2021-08-05 20:58:43 +02:00
test_encoding.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_errors.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_exit_status.py Use relative imports (#1057) 2021-05-05 14:13:39 +02:00
test_httpie.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_json.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_offline.py Add --raw to allow specifying the raw request body as an alternative to stdin (#1062) 2021-05-24 14:29:54 +02:00
test_output.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_redirects.py Skip tests that randomly fail on Windows in CI 2021-06-26 14:03:31 +02:00
test_regressions.py Modernize the code base with f-strings in tests (#1069) 2021-05-26 14:09:38 +02:00
test_sessions.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_ssl.py Add workflow to test with pyOpenSSL active (#1164) 2021-09-23 10:37:23 +02:00
test_stream.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
test_tokens.py Final touches for #1088 (#1091) 2021-06-15 14:48:44 +02:00
test_transport_plugin.py Add internal support for file-like object responses to improve adapter plugin support (#1094) 2021-07-06 21:00:06 +02:00
test_uploads.py Uniformize UTF-8 naming (#1115) 2021-08-05 20:58:43 +02:00
test_windows.py Fix several issues found with flake8 (#1081) 2021-06-01 14:46:58 +02:00
test_xml.py Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00

HTTPie Test Suite

Please see CONTRIBUTING for contribution and testing guidelines.