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

Function test_encoded_stream

tests/test_stream.py:93–102  ·  view source on GitHub ↗

Test that --stream works with non-prettified redirected terminal output.

(httpbin)

Source from the content-addressed store, hash-verified

91
92
93def test_encoded_stream(httpbin):
94 """Test that --stream works with non-prettified
95 redirected terminal output."""
96 env = MockEnvironment(
97 stdin=StdinBytesIO(BIN_FILE_PATH.read_bytes()),
98 stdin_isatty=False,
99 )
100 r = http('--pretty=none', '--stream', '--verbose', 'GET',
101 httpbin + '/get', env=env)
102 assert BINARY_SUPPRESSED_NOTICE.decode() in r
103
104
105def test_redirected_stream(httpbin):

Callers

nothing calls this directly

Calls 4

MockEnvironmentClass · 0.85
StdinBytesIOClass · 0.85
httpFunction · 0.85
decodeMethod · 0.80

Tested by

no test coverage detected