[web/test] Remove use of old test API to silence warning
authorRémi Cardona <remi.cardona@logilab.fr>
Wed, 09 Sep 2015 18:52:56 +0200
changeset 10890 504a67206fdc
parent 10889 310344d6cc6c
child 10892 f0bb16be11d0
[web/test] Remove use of old test API to silence warning
web/test/unittest_application.py
web/test/unittest_urlpublisher.py
--- a/web/test/unittest_application.py	Mon Sep 07 18:42:47 2015 +0200
+++ b/web/test/unittest_application.py	Wed Sep 09 18:52:56 2015 +0200
@@ -182,7 +182,7 @@
 
     def test_publish_validation_error(self):
         with self.admin_access.web_request() as req:
-            user = self.user(req)
+            user = req.user
             eid = text_type(user.eid)
             req.form = {
                 'eid':       eid,
--- a/web/test/unittest_urlpublisher.py	Mon Sep 07 18:42:47 2015 +0200
+++ b/web/test/unittest_urlpublisher.py	Wed Sep 09 18:52:56 2015 +0200
@@ -96,7 +96,7 @@
 
     def test_rest_path_eid(self):
         with self.admin_access.web_request() as req:
-            ctrl, rset = self.process(req, 'cwuser/eid/%s' % self.user(req).eid)
+            ctrl, rset = self.process(req, 'cwuser/eid/%s' % req.user.eid)
             self.assertEqual(ctrl, 'view')
             self.assertEqual(len(rset), 1)
             self.assertEqual(rset.description[0][0], 'CWUser')