()
| 45 | |
| 46 | |
| 47 | async def test_dns(): |
| 48 | r = intercept.Intercept() |
| 49 | with taddons.context(r) as tctx: |
| 50 | tctx.configure(r, intercept="~s ~dns") |
| 51 | |
| 52 | f = tflow.tdnsflow(resp=True) |
| 53 | await tctx.cycle(r, f) |
| 54 | assert f.intercepted |
| 55 | |
| 56 | f = tflow.tdnsflow(resp=False) |
| 57 | await tctx.cycle(r, f) |
| 58 | assert not f.intercepted |
| 59 | |
| 60 | tctx.configure(r, intercept_active=False) |
| 61 | f = tflow.tdnsflow(resp=True) |
| 62 | await tctx.cycle(r, f) |
| 63 | assert not f.intercepted |
| 64 | |
| 65 | |
| 66 | async def test_tcp(): |