[webtests/web] use the new connection api
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 02 Jul 2014 17:31:54 +0200
changeset 9849 b18ef631e72c
parent 9848 ead7a288e08e
child 9850 5ef9dd383ae2
[webtests/web] use the new connection api
web/test/unittest_web.py
--- a/web/test/unittest_web.py	Tue Jun 03 14:55:02 2014 +0200
+++ b/web/test/unittest_web.py	Wed Jul 02 17:31:54 2014 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -64,7 +64,8 @@
 
     @property
     def _post_url(self):
-        return self.request().build_url('ajax', fname='fileupload')
+        with self.admin_access.web_request() as req:
+            return req.build_url('ajax', fname='fileupload')
 
     def _fobject(self, fname):
         return open(join(self.datadir, fname), 'rb')