(tmp_path)
| 48 | |
| 49 | |
| 50 | def test_udp(tmp_path): |
| 51 | sa = save.Save() |
| 52 | with taddons.context(sa) as tctx: |
| 53 | p = str(tmp_path / "foo") |
| 54 | tctx.configure(sa, save_stream_file=p) |
| 55 | |
| 56 | tt = tflow.tudpflow() |
| 57 | sa.udp_start(tt) |
| 58 | sa.udp_end(tt) |
| 59 | |
| 60 | tt = tflow.tudpflow() |
| 61 | sa.udp_start(tt) |
| 62 | sa.udp_error(tt) |
| 63 | |
| 64 | tctx.configure(sa, save_stream_file=None) |
| 65 | assert len(rd(p)) == 2 |
| 66 | |
| 67 | |
| 68 | def test_dns(tmp_path): |