mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-04 11:47:14 +00:00
[dns] view test
This commit is contained in:
parent
525ac67605
commit
fc0bdc143c
1 changed files with 14 additions and 0 deletions
|
|
@ -138,6 +138,20 @@ def test_simple_tcp():
|
|||
assert list(v) == [f]
|
||||
|
||||
|
||||
def test_simple_dns():
|
||||
v = view.View()
|
||||
f = tflow.tdnsflow(resp=True, err=True)
|
||||
assert v.store_count() == 0
|
||||
v.dns_request(f)
|
||||
assert list(v) == [f]
|
||||
|
||||
# These all just call update
|
||||
v.dns_request(f)
|
||||
v.dns_response(f)
|
||||
v.dns_error(f)
|
||||
assert list(v) == [f]
|
||||
|
||||
|
||||
def test_filter():
|
||||
v = view.View()
|
||||
v.requestheaders(tft(method="get"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue