diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-12-19 01:15:10 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-12-19 01:15:10 +0100 |
commit | c4e90000210c392464944261c44e0bf1ed08608c (patch) | |
tree | 986ab36e78744016188ec3ec7709fb39198f3d34 /test | |
parent | 377be68cac921917b241f8aee2170f7084dbf93d (diff) | |
download | mitmproxy-c4e90000210c392464944261c44e0bf1ed08608c.tar.gz mitmproxy-c4e90000210c392464944261c44e0bf1ed08608c.tar.bz2 mitmproxy-c4e90000210c392464944261c44e0bf1ed08608c.zip |
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") |