Robert Brewer avatar Robert Brewer committed afd5d43

Updated test_routes to work with 1.12+, which requires explicit action args and requires route args to begin with a slash.

Comments (0)

Files changed (1)

cherrypy/test/test_routes.py

                 return "OK"
             
         d = cherrypy.dispatch.RoutesDispatcher()
-        d.connect(name='hounslow', route='hounslow', controller=City('Hounslow'))
-        d.connect(name='surbiton', route='surbiton', controller=City('Surbiton'),
+        d.connect(action='index', name='hounslow', route='/hounslow',
+                  controller=City('Hounslow'))
+        d.connect(name='surbiton', route='/surbiton', controller=City('Surbiton'),
                   action='index', conditions=dict(method=['GET']))
-        d.mapper.connect('surbiton', controller='surbiton',
+        d.mapper.connect('/surbiton', controller='surbiton',
                          action='update', conditions=dict(method=['POST']))
         d.connect('main', ':action', controller=Dummy())
         
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.