aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamoilenko Roman <ttahabatt@gmail.com>2018-01-14 22:54:43 +0200
committerMaximilian Hils <git@maximilianhils.com>2018-01-14 21:54:43 +0100
commit2d07678fe5e7b3001462cbc15ff1fd5042259532 (patch)
treee222d9a02a59a318810504e95ef96d97af8bdb30 /test
parent6b22da6a34f9ab4809bac5d2c940a23e165012ee (diff)
downloadmitmproxy-2d07678fe5e7b3001462cbc15ff1fd5042259532.tar.gz
mitmproxy-2d07678fe5e7b3001462cbc15ff1fd5042259532.tar.bz2
mitmproxy-2d07678fe5e7b3001462cbc15ff1fd5042259532.zip
Fix #2765 (#2792)
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/addons/test_view.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/mitmproxy/addons/test_view.py b/test/mitmproxy/addons/test_view.py
index a95d059d..6f2a9ca5 100644
--- a/test/mitmproxy/addons/test_view.py
+++ b/test/mitmproxy/addons/test_view.py
@@ -179,6 +179,10 @@ def test_load(tmpdir):
v.load_file("nonexistent_file_path")
except IOError:
assert False
+ with open(path, "wb") as f:
+ f.write(b"invalidflows")
+ v.load_file(path)
+ assert tctx.master.has_log("Invalid data format.")
def test_resolve():