(tmp_path)
| 66 | |
| 67 | |
| 68 | def test_dns(tmp_path): |
| 69 | sa = save.Save() |
| 70 | with taddons.context(sa) as tctx: |
| 71 | p = str(tmp_path / "foo") |
| 72 | tctx.configure(sa, save_stream_file=p) |
| 73 | |
| 74 | f = tflow.tdnsflow(resp=True) |
| 75 | sa.dns_request(f) |
| 76 | sa.dns_response(f) |
| 77 | tctx.configure(sa, save_stream_file=None) |
| 78 | assert rd(p)[0].response |
| 79 | |
| 80 | tctx.configure(sa, save_stream_file="+" + p) |
| 81 | f = tflow.tdnsflow(err=True) |
| 82 | sa.dns_request(f) |
| 83 | sa.dns_error(f) |
| 84 | tctx.configure(sa, save_stream_file=None) |
| 85 | assert rd(p)[1].error |
| 86 | |
| 87 | tctx.configure(sa, save_stream_file="+" + p) |
| 88 | f = tflow.tdnsflow() |
| 89 | sa.dns_request(f) |
| 90 | tctx.configure(sa, save_stream_file=None) |
| 91 | assert not rd(p)[2].response |
| 92 | |
| 93 | f = tflow.tdnsflow() |
| 94 | sa.dns_response(f) |
| 95 | assert len(rd(p)) == 3 |
| 96 | |
| 97 | |
| 98 | def test_websocket(tmp_path): |
nothing calls this directly
no test coverage detected
searching dependent graphs…