Source

CherryPy / cherrypy / test / test_virtualhost.py

Diff from to

cherrypy/test/test_virtualhost.py

             dom4.exposed = True
             
             def method(self, value):
-                return "You sent %s" % repr(value)
+                return "You sent %s" % value
             method.exposed = True
         
         class VHost:
             index.exposed = True
             
             def vmethod(self, value):
-                return "You sent %s" % repr(value)
+                return "You sent %s" % value
             vmethod.exposed = True
             
             def url(self):
         
         # Test GET, POST, and positional params
         self.getPage("/method?value=root")
-        self.assertBody("You sent u'root'")
+        self.assertBody("You sent root")
         self.getPage("/vmethod?value=dom2+GET", [('Host', 'www.mydom2.com')])
-        self.assertBody("You sent u'dom2 GET'")
+        self.assertBody("You sent dom2 GET")
         self.getPage("/vmethod", [('Host', 'www.mydom3.com')], method="POST",
                      body="value=dom3+POST")
-        self.assertBody("You sent u'dom3 POST'")
+        self.assertBody("You sent dom3 POST")
         self.getPage("/vmethod/pos", [('Host', 'www.mydom3.com')])
-        self.assertBody("You sent 'pos'")
+        self.assertBody("You sent pos")
         
         # Test that cherrypy.url uses the browser url, not the virtual url
         self.getPage("/url", [('Host', 'www.mydom2.com')])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.