aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2013-04-04 15:55:51 -0700
committerAldo Cortesi <aldo@corte.si>2013-04-04 15:55:51 -0700
commit51b775cfd4165ed80dcb5458ddff942125fcba31 (patch)
tree63df419b1e7da8f4672cb4f9cefe315f8f6ac871 /test
parentca9c60d2eb801c5902c1d2b890e7f1cb8e64959d (diff)
parent6bcf29c0ed39904cd28cf9ab97fa75c5c0f4d32c (diff)
downloadmitmproxy-51b775cfd4165ed80dcb5458ddff942125fcba31.tar.gz
mitmproxy-51b775cfd4165ed80dcb5458ddff942125fcba31.tar.bz2
mitmproxy-51b775cfd4165ed80dcb5458ddff942125fcba31.zip
Merge pull request #101 from eentzel/keep-blank-params
Keep blank URL parameters
Diffstat (limited to 'test')
-rw-r--r--test/test_console_contentview.py4
-rw-r--r--test/test_flow.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/test/test_console_contentview.py b/test/test_console_contentview.py
index 8a5dabb8..77178842 100644
--- a/test/test_console_contentview.py
+++ b/test/test_console_contentview.py
@@ -58,7 +58,9 @@ class TestContentView:
d = utils.urlencode([("one", "two"), ("three", "four")])
v = cv.ViewURLEncoded()
assert v([], d, 100)
- assert not v([], "foo", 100)
+ d = utils.urlencode([("adsfa", "")])
+ v = cv.ViewURLEncoded()
+ assert v([], d, 100)
def test_view_html(self):
v = cv.ViewHTML()
diff --git a/test/test_flow.py b/test/test_flow.py
index fce4e98a..4ad692bc 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -841,7 +841,7 @@ class TestRequest:
r = flow.Request(None, (1, 1), "host", 22, "https", "GET", "/?adsfa", h, "content")
q = r.get_query()
- assert not q
+ assert q.lst == [("adsfa", "")]
r = flow.Request(None, (1, 1), "host", 22, "https", "GET", "/foo?x=y&a=b", h, "content")
assert r.get_query()