aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pathod.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-10-25 10:59:18 +1300
committerAldo Cortesi <aldo@nullcube.com>2012-10-25 10:59:18 +1300
commit6174e46023e798517ac206b7681dd9c7d36b1283 (patch)
tree77909d09a82834be448903d7d0ef97de5439f0a4 /test/test_pathod.py
parent173b5c596e72700544f0252040adf3cbe8ebcb50 (diff)
downloadmitmproxy-6174e46023e798517ac206b7681dd9c7d36b1283.tar.gz
mitmproxy-6174e46023e798517ac206b7681dd9c7d36b1283.tar.bz2
mitmproxy-6174e46023e798517ac206b7681dd9c7d36b1283.zip
Unit test suite love: 100% coverage
Also start figuring out how to sanitize binary data in the JSON API.
Diffstat (limited to 'test/test_pathod.py')
-rw-r--r--test/test_pathod.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test_pathod.py b/test/test_pathod.py
index 429c2ef9..7bbb5545 100644
--- a/test/test_pathod.py
+++ b/test/test_pathod.py
@@ -61,7 +61,18 @@ class TestNohang(tutils.DaemonTests):
assert "Pauses have been disabled" in l["response"]["error"]
+class TestHexdump(tutils.DaemonTests):
+ hexdump = True
+ def test_hexdump(self):
+ r = self.get(r"200:b'\xf0'")
+
+
class CommonTests(tutils.DaemonTests):
+ def test_binarydata(self):
+ r = self.get(r"200:b'\xf0'")
+ l = self.d.last_log()
+ # FIXME: Other binary data elements
+
def test_sizelimit(self):
r = self.get("200:b@1g")
assert r.status_code == 800