[webtests/views_xmlrss] use the new connection api
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Mon, 02 Jun 2014 16:48:37 +0200
changeset 9807 958fc84a730f
parent 9806 37931aaebcfc
child 9808 d121b74e043f
[webtests/views_xmlrss] use the new connection api
web/test/unittest_views_xmlrss.py
--- a/web/test/unittest_views_xmlrss.py	Mon Jun 02 16:18:06 2014 +0200
+++ b/web/test/unittest_views_xmlrss.py	Mon Jun 02 16:48:37 2014 +0200
@@ -1,13 +1,15 @@
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.web.views.xmlrss import SERIALIZERS
+
 class EntityXMLViewTC(CubicWebTC):
     """see also cw.sobjects.test.unittest_parsers"""
     def test(self):
-        req = self.request(relation=['tags-object', 'in_group-subject',
-                                     'in_state-subject', 'use_email-subject'])
-        self.assertMultiLineEqual(
-            req.user.view('xml'),
-            '''\
+        rels = ['tags-object', 'in_group-subject',
+                'in_state-subject', 'use_email-subject']
+        with self.admin_access.web_request(relation=rels) as req:
+            self.assertMultiLineEqual(
+                req.user.view('xml'),
+                '''\
 <CWUser eid="6" cwuri="None6" cwsource="system">
   <login>admin</login>
   <upassword/>