(self, capsys)
| 187 | |
| 188 | class TestHardumpOption: |
| 189 | def test_simple(self, capsys): |
| 190 | s = SaveHar() |
| 191 | with taddons.context(s) as tctx: |
| 192 | tctx.configure(s, hardump="-") |
| 193 | |
| 194 | s.response(tflow.tflow()) |
| 195 | |
| 196 | s.error(tflow.tflow()) |
| 197 | |
| 198 | ws = tflow.twebsocketflow() |
| 199 | s.response(ws) |
| 200 | s.websocket_end(ws) |
| 201 | |
| 202 | s.done() |
| 203 | |
| 204 | out = json.loads(capsys.readouterr().out) |
| 205 | assert len(out["log"]["entries"]) == 3 |
| 206 | |
| 207 | def test_filter(self, capsys): |
| 208 | s = SaveHar() |