aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_flow.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_flow.py')
-rw-r--r--test/test_flow.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_flow.py b/test/test_flow.py
index 616a2b2f..e4cd6da2 100644
--- a/test/test_flow.py
+++ b/test/test_flow.py
@@ -577,6 +577,18 @@ class uRequest(libpry.AutoTree):
r2 = r.copy()
assert r == r2
+ def test_getset_form_urlencoded(self):
+ h = flow.Headers()
+ h["content-type"] = [flow.HDR_FORM_URLENCODED]
+ d = [("one", "two"), ("three", "four")]
+ r = flow.Request(None, "host", 22, "https", "GET", "/", h, utils.urlencode(d))
+ assert r.get_form_urlencoded() == d
+
+ d = [("x", "y")]
+ r.set_form_urlencoded(d)
+ assert r.get_form_urlencoded() == d
+
+
def test_getset_query(self):
h = flow.Headers()