aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2017-12-17 17:44:36 +0000
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2017-12-18 09:19:21 +0100
commit8d836d251e1ce0b7141155fdc84aed8efc1850a6 (patch)
tree1c4f55ebc065fd8f102dfad448d8e3299c50c4e3 /test
parent1a7ce384dac5099308b68e629c88e7b81ad44866 (diff)
downloadmitmproxy-8d836d251e1ce0b7141155fdc84aed8efc1850a6.tar.gz
mitmproxy-8d836d251e1ce0b7141155fdc84aed8efc1850a6.tar.bz2
mitmproxy-8d836d251e1ce0b7141155fdc84aed8efc1850a6.zip
fix #2640
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_save.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_save.py b/test/mitmproxy/addons/test_save.py
index a4e425cd..84564157 100644
--- a/test/mitmproxy/addons/test_save.py
+++ b/test/mitmproxy/addons/test_save.py
@@ -44,6 +44,18 @@ def test_tcp(tmpdir):
assert rd(p)
+def test_websocket(tmpdir):
+ sa = save.Save()
+ with taddons.context() as tctx:
+ p = str(tmpdir.join("foo"))
+ tctx.configure(sa, save_stream_file=p)
+
+ f = tflow.twebsocketflow()
+ sa.websocket_start(f)
+ tctx.configure(sa, save_stream_file=None)
+ assert rd(p)
+
+
def test_save_command(tmpdir):
sa = save.Save()
with taddons.context() as tctx: