MCPcopy
hub / github.com/httpie/cli / test_terminal_output_response_charset_detection

Function test_terminal_output_response_charset_detection

tests/test_encoding.py:139–147  ·  view source on GitHub ↗
(text, charset)

Source from the content-addressed store, hash-verified

137@pytest.mark.parametrize('charset, text', CHARSET_TEXT_PAIRS)
138@responses.activate
139def test_terminal_output_response_charset_detection(text, charset):
140 responses.add(
141 method=responses.POST,
142 url=DUMMY_URL,
143 body=text.encode(charset),
144 content_type='text/plain',
145 )
146 r = http('--form', 'POST', DUMMY_URL)
147 assert text in r
148
149
150@pytest.mark.parametrize('charset, text', CHARSET_TEXT_PAIRS)

Callers

nothing calls this directly

Calls 2

httpFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected