Robert Brewer  committed 01f2d6b

Better test for #650.

  • Participants
  • Parent commits fd60630
  • Branches default

Comments (0)

Files changed (1)

File cherrypy/test/

             # This should be a file object (temp file),
             # which CP will just pipe back out if we tell it to.
             return cherrypy.request.body
+        def reachable(self):
+            return "success"
     class Divorce:
         """HTTP Method handlers shouldn't collide with normal method names.
-        # Request a PUT method with an empty body.
+        # Request a PUT method with no body whatsoever (not an empty one).
         # See
-        h = [("Content-Type", "text/plain"),
-             ("Content-Length", "0")]
-        self.getPage("/method/request_body", headers=h, method="PUT", body="")
-        self.assertBody("")
+        # Provide a C-T or webtest will provide one (and a C-L) for us.
+        h = [("Content-Type", "text/plain")]
+        self.getPage("/method/reachable", headers=h, method="PUT")
+        self.assertBody("success")
         # Request a custom method with a request body
         b = ('<?xml version="1.0" encoding="utf-8" ?>\n\n'