diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-12-19 15:19:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-19 15:19:02 +0100 |
commit | cbc0d3fd410f50508fdd7b4cb05bac8f6a18a3a4 (patch) | |
tree | 55816c91cb7d4ac9a230bba9322bab0b83c809a7 /test | |
parent | 504c289ad0d670fbdc0fb0f598d2e693cda9f5f7 (diff) | |
parent | c4e90000210c392464944261c44e0bf1ed08608c (diff) | |
download | mitmproxy-cbc0d3fd410f50508fdd7b4cb05bac8f6a18a3a4.tar.gz mitmproxy-cbc0d3fd410f50508fdd7b4cb05bac8f6a18a3a4.tar.bz2 mitmproxy-cbc0d3fd410f50508fdd7b4cb05bac8f6a18a3a4.zip |
Merge pull request #1876 from mhils/1858
fix #1858
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/net/http/test_request.py | 4 | ||||
-rw-r--r-- | test/mitmproxy/test_examples.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/mitmproxy/net/http/test_request.py b/test/mitmproxy/net/http/test_request.py index 9c0ec333..dfa76ba8 100644 --- a/test/mitmproxy/net/http/test_request.py +++ b/test/mitmproxy/net/http/test_request.py @@ -255,11 +255,11 @@ class TestRequestUtils: assert not request.urlencoded_form request.headers["Content-Type"] = "application/x-www-form-urlencoded" - assert list(request.urlencoded_form.items()) == [(b"foobar", b"baz")] + assert list(request.urlencoded_form.items()) == [("foobar", "baz")] def test_set_urlencoded_form(self): request = treq() - request.urlencoded_form = [(b'foo', b'bar'), (b'rab', b'oof')] + request.urlencoded_form = [('foo', 'bar'), ('rab', 'oof')] assert request.headers["Content-Type"] == "application/x-www-form-urlencoded" assert request.content diff --git a/test/mitmproxy/test_examples.py b/test/mitmproxy/test_examples.py index 610c9dad..3930e8df 100644 --- a/test/mitmproxy/test_examples.py +++ b/test/mitmproxy/test_examples.py @@ -68,11 +68,11 @@ class TestScripts(mastertest.MasterTest): f = tflow.tflow(req=tutils.treq(headers=form_header)) m.request(f) - assert f.request.urlencoded_form[b"mitmproxy"] == b"rocks" + assert f.request.urlencoded_form["mitmproxy"] == "rocks" f.request.headers["content-type"] = "" m.request(f) - assert list(f.request.urlencoded_form.items()) == [(b"foo", b"bar")] + assert list(f.request.urlencoded_form.items()) == [("foo", "bar")] def test_modify_querystring(self): m, sc = tscript("simple/modify_querystring.py") |