# HG changeset patch # User Aurelien Campeas # Date 1417516621 -3600 # Node ID ac63f7ec5af0ca3e1893e31a44ee43f5b14b8ac8 # Parent ed0b076c119b19e7531cc8354d5d5bd466a126fe [test/view forms] use the official, undeprecated API diff -r ed0b076c119b -r ac63f7ec5af0 web/test/unittest_views_forms.py --- a/web/test/unittest_views_forms.py Tue May 27 18:47:24 2014 +0200 +++ b/web/test/unittest_views_forms.py Tue Dec 02 11:37:01 2014 +0100 @@ -21,14 +21,14 @@ class InlinedFormTC(CubicWebTC): def test_linked_to(self): - req = self.request() - formview = req.vreg['views'].select( - 'inline-creation', req, - etype='File', rtype='described_by_test', role='subject', - peid=123, - petype='Salesterm') - self.assertEqual({('described_by_test', 'object'): [123]}, - formview.form.linked_to) + with self.admin_access.web_request() as req: + formview = req.vreg['views'].select( + 'inline-creation', req, + etype='File', rtype='described_by_test', role='subject', + peid=123, + petype='Salesterm') + self.assertEqual({('described_by_test', 'object'): [123]}, + formview.form.linked_to) if __name__ == '__main__': from logilab.common.testlib import unittest_main