diff options
author | Matthew Shao <me@matshao.com> | 2017-08-15 22:23:21 +0800 |
---|---|---|
committer | Matthew Shao <me@matshao.com> | 2017-08-16 09:42:24 +0800 |
commit | 3f497640ab0a69838fb605ed9a4b1cee76e462aa (patch) | |
tree | 7efd2fa1b4351033ee2054e04daa2abdf745f9fa /test | |
parent | 6560b0dcdba72085ce6c53d68a9e01d293936893 (diff) | |
download | mitmproxy-3f497640ab0a69838fb605ed9a4b1cee76e462aa.tar.gz mitmproxy-3f497640ab0a69838fb605ed9a4b1cee76e462aa.tar.bz2 mitmproxy-3f497640ab0a69838fb605ed9a4b1cee76e462aa.zip |
[web] Update tests.
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/tools/web/test_app.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/mitmproxy/tools/web/test_app.py b/test/mitmproxy/tools/web/test_app.py index 091ef5e8..aaf949a8 100644 --- a/test/mitmproxy/tools/web/test_app.py +++ b/test/mitmproxy/tools/web/test_app.py @@ -186,7 +186,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): f.response.headers["Content-Encoding"] = "ran\x00dom" f.response.headers["Content-Disposition"] = 'inline; filename="filename.jpg"' - r = self.fetch("/flows/42/response/content") + r = self.fetch("/flows/42/response/_content") assert r.body == b"message" assert r.headers["Content-Encoding"] == "random" assert r.headers["Content-Disposition"] == 'attachment; filename="filename.jpg"' @@ -194,17 +194,17 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): del f.response.headers["Content-Disposition"] f.request.path = "/foo/bar.jpg" assert self.fetch( - "/flows/42/response/content" + "/flows/42/response/_content" ).headers["Content-Disposition"] == 'attachment; filename=bar.jpg' f.response.content = b"" - assert self.fetch("/flows/42/response/content").code == 400 + assert self.fetch("/flows/42/response/_content").code == 400 f.revert() def test_update_flow_content(self): assert self.fetch( - "/flows/42/request/content", + "/flows/42/request/_content", method="POST", body="new" ).code == 200 @@ -222,7 +222,7 @@ class TestApp(tornado.testing.AsyncHTTPTestCase): b'--somefancyboundary--\r\n' ) assert self.fetch( - "/flows/42/request/content", + "/flows/42/request/_content", method="POST", headers={"Content-Type": 'multipart/form-data; boundary="somefancyboundary"'}, body=body |