(httpbin_both)
| 106 | |
| 107 | |
| 108 | def 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 | |
| 126 | def test_compress_file(httpbin_both): |
nothing calls this directly
no test coverage detected