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

Function test_compress_stdin

tests/test_compress.py:108–123  ·  view source on GitHub ↗
(httpbin_both)

Source from the content-addressed store, hash-verified

106
107
108def test_compress_stdin(httpbin_both):
109 env = MockEnvironment(
110 stdin=StdinBytesIO(FILE_PATH.read_bytes()),
111 stdin_isatty=False,
112 )
113 r = http(
114 '--compress',
115 '--compress',
116 'PATCH',
117 httpbin_both + '/patch',
118 env=env,
119 )
120 assert HTTP_OK in r
121 assert r.json['headers']['Content-Encoding'] == 'deflate'
122 assert_decompressed_equal(r.json['data'], FILE_CONTENT.strip())
123 assert not r.json['json']
124
125
126def test_compress_file(httpbin_both):

Callers

nothing calls this directly

Calls 4

MockEnvironmentClass · 0.85
StdinBytesIOClass · 0.85
httpFunction · 0.85

Tested by

no test coverage detected