(self, tmpdir, data)
| 109 | await rf.load_flows(stdin.buffer) |
| 110 | |
| 111 | async def test_normal(self, tmpdir, data): |
| 112 | rf = readfile.ReadFileStdin() |
| 113 | with taddons.context(rf) as tctx: |
| 114 | tf = tmpdir.join("tfile") |
| 115 | with mock.patch("mitmproxy.master.Master.load_flow") as mck: |
| 116 | tf.write(data.getvalue()) |
| 117 | tctx.configure(rf, rfile=str(tf)) |
| 118 | mck.assert_not_awaited() |
| 119 | rf.running() |
| 120 | await asyncio.sleep(0) |
| 121 | mck.assert_awaited() |