()
| 145 | |
| 146 | |
| 147 | def test_binary_content(): |
| 148 | resp_content = SaveHar().make_har( |
| 149 | [tflow.tflow(resp=tutils.tresp(content=b"foo" + b"\xff" * 10))] |
| 150 | )["log"]["entries"][0]["response"]["content"] |
| 151 | assert resp_content == { |
| 152 | "compression": 0, |
| 153 | "encoding": "base64", |
| 154 | "mimeType": "", |
| 155 | "size": 13, |
| 156 | "text": "Zm9v/////////////w==", |
| 157 | } |
| 158 | |
| 159 | |
| 160 | @pytest.mark.parametrize( |