diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-09-26 17:40:22 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-09-26 17:40:22 +0200 |
commit | fa722e02901c11f0d52176177d1032e9ab0cae1f (patch) | |
tree | b1620f744a0947ed9bd735563fc59a8a7b17161f /test/test_app.py | |
parent | a163dba582e6aac103262bac50fcd390ebce0c72 (diff) | |
download | mitmproxy-fa722e02901c11f0d52176177d1032e9ab0cae1f.tar.gz mitmproxy-fa722e02901c11f0d52176177d1032e9ab0cae1f.tar.bz2 mitmproxy-fa722e02901c11f0d52176177d1032e9ab0cae1f.zip |
adjust to netlib changes
Diffstat (limited to 'test/test_app.py')
-rw-r--r-- | test/test_app.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/test_app.py b/test/test_app.py index 4571617f..4536db8e 100644 --- a/test/test_app.py +++ b/test/test_app.py @@ -7,7 +7,7 @@ class TestApp(tutils.DaemonTests): def test_index(self): r = self.getpath("/") assert r.status_code == 200 - assert r.body + assert r.content def test_about(self): r = self.getpath("/about") @@ -38,48 +38,48 @@ class TestApp(tutils.DaemonTests): def test_response_preview(self): r = self.getpath("/response_preview", params=dict(spec="200")) assert r.status_code == 200 - assert 'Response' in r.body + assert 'Response' in r.content r = self.getpath("/response_preview", params=dict(spec="foo")) assert r.status_code == 200 - assert 'Error' in r.body + assert 'Error' in r.content r = self.getpath("/response_preview", params=dict(spec="200:b@100m")) assert r.status_code == 200 - assert "too large" in r.body + assert "too large" in r.content r = self.getpath("/response_preview", params=dict(spec="200:b@5k")) assert r.status_code == 200 - assert 'Response' in r.body + assert 'Response' in r.content r = self.getpath( "/response_preview", params=dict( spec="200:b<nonexistent")) assert r.status_code == 200 - assert 'File access denied' in r.body + 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.body + assert 'testfile' in r.content def test_request_preview(self): r = self.getpath("/request_preview", params=dict(spec="get:/")) assert r.status_code == 200 - assert 'Request' in r.body + assert 'Request' in r.content r = self.getpath("/request_preview", params=dict(spec="foo")) assert r.status_code == 200 - assert 'Error' in r.body + assert 'Error' in r.content r = self.getpath("/request_preview", params=dict(spec="get:/:b@100m")) assert r.status_code == 200 - assert "too large" in r.body + assert "too large" in r.content r = self.getpath("/request_preview", params=dict(spec="get:/:b@5k")) assert r.status_code == 200 - assert 'Request' in r.body + assert 'Request' in r.content r = self.getpath("/request_preview", params=dict(spec="")) assert r.status_code == 200 - assert 'empty spec' in r.body + assert 'empty spec' in r.content |