aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-12-20 19:49:02 +1300
committerGitHub <noreply@github.com>2017-12-20 19:49:02 +1300
commita6a4b1c33bb34ceac4bc7e7e1979d6b52b47c28c (patch)
tree2852c85e21ad4b4a6fafcc06ee9e560637aab560 /test
parent91b9ca8675b876e38e98649484c16a412fa39eeb (diff)
parent7d45d7f15e04ffd5dc1e593d2d3f3c4c9bfd1193 (diff)
downloadmitmproxy-a6a4b1c33bb34ceac4bc7e7e1979d6b52b47c28c.tar.gz
mitmproxy-a6a4b1c33bb34ceac4bc7e7e1979d6b52b47c28c.tar.bz2
mitmproxy-a6a4b1c33bb34ceac4bc7e7e1979d6b52b47c28c.zip
Merge pull request #2716 from cortesi/cmdfixes
various command-related fixes
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_cut.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_cut.py b/test/mitmproxy/addons/test_cut.py
index 0a523fff..71e699db 100644
--- a/test/mitmproxy/addons/test_cut.py
+++ b/test/mitmproxy/addons/test_cut.py
@@ -135,6 +135,11 @@ def test_cut():
with pytest.raises(exceptions.CommandError):
assert c.cut(tflows, ["__dict__"]) == [[""]]
+ with taddons.context():
+ tflows = [tflow.tflow(resp=False)]
+ assert c.cut(tflows, ["response.reason"]) == [[""]]
+ assert c.cut(tflows, ["response.header[key]"]) == [[""]]
+
c = cut.Cut()
with taddons.context():
tflows = [tflow.ttcpflow()]