[test] update unittest_utils to 3.19 api
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 03 Apr 2014 19:55:19 +0200
changeset 9657 3ff4c6f80c37
parent 9656 19c423d9d215
child 9658 c5b47406a15d
[test] update unittest_utils to 3.19 api
test/unittest_utils.py
--- 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/'