aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2018-01-08 15:45:28 +0100
committerGitHub <noreply@github.com>2018-01-08 15:45:28 +0100
commit67300fab3119f055a6cbb43b7cbc9d33e849d165 (patch)
tree03cbac2b88606b348717a87a2cfc703672cac8c4 /test
parent821d76df02f70ccca5623cbc65d02b80e3998704 (diff)
parenta6f6f8cd3226de3c89ec9d6cdeab972c88b94a18 (diff)
downloadmitmproxy-67300fab3119f055a6cbb43b7cbc9d33e849d165.tar.gz
mitmproxy-67300fab3119f055a6cbb43b7cbc9d33e849d165.tar.bz2
mitmproxy-67300fab3119f055a6cbb43b7cbc9d33e849d165.zip
Merge pull request #2773 from MatthewShao/fix#2760
Fix #2760
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 6e4af367..a95d059d 100644
--- a/test/mitmproxy/addons/test_view.py
+++ b/test/mitmproxy/addons/test_view.py
@@ -147,6 +147,10 @@ def test_create():
assert v[0].request.url == "http://foo.com/"
v.create("get", "http://foo.com")
assert len(v) == 2
+ with pytest.raises(exceptions.CommandError, match="Invalid URL"):
+ v.create("get", "http://foo.com\\")
+ with pytest.raises(exceptions.CommandError, match="Invalid URL"):
+ v.create("get", "http://")
def test_orders():