Commits

Robert Brewer  committed fa58af7

Minimize problems from overlapping threads in tests.

  • Participants
  • Parent commits c1a604d

Comments (0)

Files changed (1)

File cherrypy/test/helper.py

                         if k.lower() == 'set-cookie']
         
         try:
-            self.body = []
+            newbody = []
             for chunk in response.body:
-                self.body.append(chunk)
+                newbody.append(chunk)
             request.close()
         except Exception, ex:
             if cherrypy.config.get("stream_response", False):
             # Don't reset status or headers; we're emulating an error which
             # occurs after status and headers have been written to the client.
             for chunk in b:
-                self.body.append(chunk)
-        self.body = "".join(self.body)
+                newbody.append(chunk)
+        self.body = "".join(newbody)
         
         if webtest.ServerError.on:
             self.tearDown()