aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathoc.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-10-31 11:23:53 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-10-31 11:34:58 +1300
commit3f50930dc06a980ac5dcf012fa23ecc0a70ce1b4 (patch)
tree9c3bf8fe82326072d2c470f47d12ed654b991fb6 /test/test_pathoc.py
parent8c6cc8140c6ac51966bdfabd5bb1180c2dd623b0 (diff)
downloadmitmproxy-3f50930dc06a980ac5dcf012fa23ecc0a70ce1b4.tar.gz
mitmproxy-3f50930dc06a980ac5dcf012fa23ecc0a70ce1b4.tar.bz2
mitmproxy-3f50930dc06a980ac5dcf012fa23ecc0a70ce1b4.zip
Use .freeze to implement the -e explain flags for pathod and pathoc.
This now prints (in pathoc) or logs (in pathod) a frozen specification that includes an expanded record of all generated values and locations.
Diffstat (limited to 'test/test_pathoc.py')
-rw-r--r--test/test_pathoc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_pathoc.py b/test/test_pathoc.py
index c22fd4f8..ca25be58 100644
--- a/test/test_pathoc.py
+++ b/test/test_pathoc.py
@@ -65,6 +65,10 @@ class TestDaemon:
assert "Invalid headers" in v
assert "HTTP/" in v
+ def test_explain(self):
+ reqs = [ "get:/p/200:b@100" ]
+ assert not "b@100" in self.tval(reqs, explain=True)
+
def test_showreq(self):
reqs = [ "get:/api/info:p0,0", "get:/api/info:p0,0" ]
assert self.tval(reqs, showreq=True).count("unprintables escaped") == 2