--- 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