Commits

Christian Heimes committed afcd0f1

test another special case

  • Participants
  • Parent commits cb203e5

Comments (0)

Files changed (1)

         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)
             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()