aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_app.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-07-24 17:43:41 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-07-24 17:43:41 +0200
commitf8b4d666870163d6770aabefe212b8ecd981d490 (patch)
tree8c6f2fc9ef4c06c40a04514f651785540d278bf3 /test/test_app.py
parent9a1bee31d6d7b92bf5b4cb68d853c856acdfb036 (diff)
parent96c9c4459f0bb9b76ab34f8c8d03d0e5d28621f4 (diff)
downloadmitmproxy-f8b4d666870163d6770aabefe212b8ecd981d490.tar.gz
mitmproxy-f8b4d666870163d6770aabefe212b8ecd981d490.tar.bz2
mitmproxy-f8b4d666870163d6770aabefe212b8ecd981d490.zip
Merge pull request #31 from Kriechi/protocol-refactor
HTTP protocol refactoring
Diffstat (limited to 'test/test_app.py')
-rw-r--r--test/test_app.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/test_app.py b/test/test_app.py
index 4536db8e..4571617f 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.content
+ assert r.body
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.content
+ assert 'Response' in r.body
r = self.getpath("/response_preview", params=dict(spec="foo"))
assert r.status_code == 200
- assert 'Error' in r.content
+ assert 'Error' in r.body
r = self.getpath("/response_preview", params=dict(spec="200:b@100m"))
assert r.status_code == 200
- assert "too large" in r.content
+ assert "too large" in r.body
r = self.getpath("/response_preview", params=dict(spec="200:b@5k"))
assert r.status_code == 200
- assert 'Response' in r.content
+ assert 'Response' in r.body
r = self.getpath(
"/response_preview",
params=dict(
spec="200:b<nonexistent"))
assert r.status_code == 200
- assert 'File access denied' in r.content
+ assert 'File access denied' in r.body
r = self.getpath("/response_preview", params=dict(spec="200:b<file"))
assert r.status_code == 200
- assert 'testfile' in r.content
+ assert 'testfile' in r.body
def test_request_preview(self):
r = self.getpath("/request_preview", params=dict(spec="get:/"))
assert r.status_code == 200
- assert 'Request' in r.content
+ assert 'Request' in r.body
r = self.getpath("/request_preview", params=dict(spec="foo"))
assert r.status_code == 200
- assert 'Error' in r.content
+ assert 'Error' in r.body
r = self.getpath("/request_preview", params=dict(spec="get:/:b@100m"))
assert r.status_code == 200
- assert "too large" in r.content
+ assert "too large" in r.body
r = self.getpath("/request_preview", params=dict(spec="get:/:b@5k"))
assert r.status_code == 200
- assert 'Request' in r.content
+ assert 'Request' in r.body
r = self.getpath("/request_preview", params=dict(spec=""))
assert r.status_code == 200
- assert 'empty spec' in r.content
+ assert 'empty spec' in r.body