test/unittest_utils.py
changeset 9657 3ff4c6f80c37
parent 9599 13dd3a57dabb
child 10235 684215aca046
--- a/test/unittest_utils.py	Thu Apr 03 19:55:11 2014 +0200
+++ b/test/unittest_utils.py	Thu Apr 03 19:55:19 2014 +0200
@@ -229,11 +229,11 @@
 class HTMLHeadTC(CubicWebTC):
 
     def htmlhead(self, datadir_url):
-        req = self.request()
-        base_url = u'http://test.fr/data/'
-        req.datadir_url = base_url
-        head = HTMLHead(req)
-        return head
+        with self.admin_access.web_request() as req:
+            base_url = u'http://test.fr/data/'
+            req.datadir_url = base_url
+            head = HTMLHead(req)
+            return head
 
     def test_concat_urls(self):
         base_url = u'http://test.fr/data/'