web/test/unittest_application.py
changeset 3293 69c0ba095536
parent 2773 b2530e3e0afb
parent 3265 96c8363b8f64
child 3462 3a79fecdd2b4
--- a/web/test/unittest_application.py	Tue Sep 15 15:01:41 2009 +0200
+++ b/web/test/unittest_application.py	Thu Sep 17 15:16:53 2009 +0200
@@ -69,14 +69,17 @@
 
 
     def test_from_controller(self):
+        self.req.vreg['controllers'] = {'view': 1, 'login': 1}
         self.assertEquals(self.req.from_controller(), 'view')
         req = FakeRequest(url='project?vid=list')
+        req.vreg['controllers'] = {'view': 1, 'login': 1}
         # this assertion is just to make sure that relative_path can be
         # correctly computed as it is used in from_controller()
         self.assertEquals(req.relative_path(False), 'project')
         self.assertEquals(req.from_controller(), 'view')
         # test on a valid non-view controller
         req = FakeRequest(url='login?x=1&y=2')
+        req.vreg['controllers'] = {'view': 1, 'login': 1}
         self.assertEquals(req.relative_path(False), 'login')
         self.assertEquals(req.from_controller(), 'login')