web/test/unittest_views_basecontrollers.py
branchstable
changeset 1899 361774742f3e
parent 1797 c2a80130b06d
child 1901 8681962e171e
--- a/web/test/unittest_views_basecontrollers.py	Thu May 21 14:05:09 2009 +0200
+++ b/web/test/unittest_views_basecontrollers.py	Fri May 22 00:46:41 2009 +0200
@@ -1,7 +1,7 @@
 """cubicweb.web.views.basecontrollers unit tests"""
 import simplejson
 
-from logilab.common.testlib import unittest_main
+from logilab.common.testlib import unittest_main, mock_object
 
 from cubicweb import Binary, Unauthorized
 from cubicweb.devtools._apptest import TestEnvironment
@@ -533,7 +533,7 @@
         rset = self.john.as_rset()
         rset.req = req
         self.assertTextEquals(ctrl.publish(),
-                              xhtml_wrap(ctrl.view('primary', rset)))
+                              xhtml_wrap(mock_object(req=req), ctrl.view('primary', rset)))
 
 #     def test_json_exec(self):
 #         rql = 'Any T,N WHERE T is Tag, T name N'