aboutsummaryrefslogtreecommitdiffstats
path: root/test/mitmproxy/contentviews/test_query.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/mitmproxy/contentviews/test_query.py')
-rw-r--r--test/mitmproxy/contentviews/test_query.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/mitmproxy/contentviews/test_query.py b/test/mitmproxy/contentviews/test_query.py
new file mode 100644
index 00000000..d2bddd05
--- /dev/null
+++ b/test/mitmproxy/contentviews/test_query.py
@@ -0,0 +1,13 @@
+from mitmproxy.contentviews import query
+from mitmproxy.types import multidict
+from . import full_eval
+
+
+def test_view_query():
+ d = ""
+ v = full_eval(query.ViewQuery())
+ f = v(d, query=multidict.MultiDict([("foo", "bar")]))
+ assert f[0] == "Query"
+ assert f[1] == [[("header", "foo: "), ("text", "bar")]]
+
+ assert v(d) == ("Query", [])