test update, no more a FakeVReg, needs to hack it 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 16 Sep 2009 17:32:39 +0200
branch3.5
changeset 3265 96c8363b8f64
parent 3264 5d1f3f6c042d
child 3266 38ffdb284689
test update, no more a FakeVReg, needs to hack it
web/test/unittest_application.py
--- a/web/test/unittest_application.py	Wed Sep 16 17:29:45 2009 +0200
+++ b/web/test/unittest_application.py	Wed Sep 16 17:32:39 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')