[webtests/basetemplates] use the new connection api
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 03 Jun 2014 14:45:32 +0200
changeset 9847 b23c90721351
parent 9846 67c1b77b44be
child 9848 ead7a288e08e
[webtests/basetemplates] use the new connection api
web/test/unittest_views_basetemplates.py
--- a/web/test/unittest_views_basetemplates.py	Thu Jun 05 15:14:13 2014 +0200
+++ b/web/test/unittest_views_basetemplates.py	Tue Jun 03 14:45:32 2014 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2012 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.
@@ -18,7 +18,6 @@
 
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.devtools.htmlparser import XMLValidator
-from cubicweb.dbapi import DBAPISession
 
 
 class LogFormTemplateTC(CubicWebTC):
@@ -39,7 +38,8 @@
 class MainNoTopTemplateTC(CubicWebTC):
 
     def test_valid_xhtml(self):
-        self.view('index', template='main-no-top')
+        with self.admin_access.web_request() as req:
+            self.view('index', template='main-no-top', req=req)
 
 
 if __name__ == '__main__':