diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-10-28 12:56:08 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-10-28 12:56:08 +1300 |
commit | 9d42a06c92f0fdc7ca986b738086d361d9b0599b (patch) | |
tree | 03604d6f93c3358d8cf70bf0e94f601e8ce5754b /test | |
parent | f54ed69a358d2dd059bd844c752f96e29e90e269 (diff) | |
download | mitmproxy-9d42a06c92f0fdc7ca986b738086d361d9b0599b.tar.gz mitmproxy-9d42a06c92f0fdc7ca986b738086d361d9b0599b.tar.bz2 mitmproxy-9d42a06c92f0fdc7ca986b738086d361d9b0599b.zip |
Move message body to new lazy-generator scheme.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_app.py | 8 | ||||
-rw-r--r-- | test/test_language.py | 2 | ||||
-rw-r--r-- | test/test_pathod.py | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/test/test_app.py b/test/test_app.py index 7b2451d6..b3194052 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -47,9 +47,13 @@ class TestApp(tutils.DaemonTests): assert r.status_code == 200 assert 'Response' in r.content - r = self.getpath("/response_preview", params=dict(spec="200:b<foo")) + r = self.getpath("/response_preview", params=dict(spec="200:b<nonexistent")) assert r.status_code == 200 - assert 'File access is disabled' in r.content + assert 'File access denied' in r.content + + r = self.getpath("/response_preview", params=dict(spec="200:b<file")) + assert r.status_code == 200 + assert 'testfile' in r.content def test_request_preview(self): r = self.getpath("/request_preview", params=dict(spec="get:/")) diff --git a/test/test_language.py b/test/test_language.py index e5ec51d2..54f96d51 100644 --- a/test/test_language.py +++ b/test/test_language.py @@ -508,7 +508,7 @@ class TestResponse: r = language.parse_response({}, "400'msg':b@100b") assert r.msg == "msg" - assert r.body[:] + assert r.body.values({}) assert str(r) def test_render(self): diff --git a/test/test_pathod.py b/test/test_pathod.py index 195c7333..83f57727 100644 --- a/test/test_pathod.py +++ b/test/test_pathod.py @@ -141,7 +141,7 @@ class CommonTests(tutils.DaemonTests): def test_source_access_denied(self): rsp = self.get("200:b</foo") assert rsp.status_code == 800 - assert "Access Denied" in rsp.content + assert "File access denied" in rsp.content class TestDaemon(CommonTests): |