summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2013-02-15 13:52:52 +0100
committerChristian Heimes <christian@python.org>2013-02-15 13:52:52 +0100
commitedca11fb4499abef630e2ee21c22b6983ffe8e37 (patch)
tree09dad7967121ad2eb314e43f32809b2bb5521f41
parent5075c133dedd599b3e8a139ee47e4fc34f3615d7 (diff)
downloaddefusedxml-git-edca11fb4499abef630e2ee21c22b6983ffe8e37.tar.gz
test another special case
-rw-r--r--tests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests.py b/tests.py
index f188dc5..6637782 100644
--- a/tests.py
+++ b/tests.py
@@ -459,11 +459,11 @@ class TestDefusedGzip(DefusedTestCase):
f.seek(0)
return f
- def decode_response(self, response, limit=None):
+ def decode_response(self, response, limit=None, readlength=1024):
dec = xmlrpc.DefusedGzipDecodedResponse(response, limit)
acc = []
while True:
- data = dec.read(1024)
+ data = dec.read(readlength)
if not data:
break
acc.append(data)
@@ -497,6 +497,10 @@ class TestDefusedGzip(DefusedTestCase):
response = self.get_gzipped(4096)
self.decode_response(response, 4095)
+ with self.assertRaises(ValueError):
+ response = self.get_gzipped(4096)
+ self.decode_response(response, 4095, 8192)
+
def test_main():
suite = unittest.TestSuite()