# HG changeset patch # User Julien Cristau # Date 1404315114 -7200 # Node ID b18ef631e72c95e32fbf931a01e0c8ad6e6890a6 # Parent ead7a288e08e59f7385ee325b2fbe1218a98f01d [webtests/web] use the new connection api diff -r ead7a288e08e -r b18ef631e72c 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')