Strip out extra variables from the actual mime type (#1244)

* Strip out extra variables from the actual mime type

* mention in changelog

* Update CHANGELOG.md

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
This commit is contained in:
Batuhan Taskaya
2021-12-16 18:04:34 +03:00
committed by GitHub
parent 7bd7aa20d2
commit 2b78d04410
3 changed files with 18 additions and 1 deletions

View File

@ -215,6 +215,18 @@ class TestColors:
assert get_lexer('xxx/yyy') is None
@pytest.mark.parametrize("endpoint", [
"/encoding/utf8",
"/html",
"/json",
"/xml",
])
def test_ensure_contents_colored(httpbin, endpoint):
env = MockEnvironment(colors=256)
r = http('--body', 'GET', httpbin + endpoint, env=env)
assert COLOR in r
class TestPrettyOptions:
"""Test the --pretty handling."""