[test] reindent and use request() rather than bare session
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 10 Sep 2012 13:59:25 +0200
changeset 8549 0740ffe73df1
parent 8544 3d049071957e
child 8551 6cf9e4da54a9
[test] reindent and use request() rather than bare session this avoid error due to implementation details of session
test/unittest_schema.py
--- a/test/unittest_schema.py	Tue Sep 11 21:51:54 2012 +0200
+++ b/test/unittest_schema.py	Mon Sep 10 13:59:25 2012 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -350,8 +350,8 @@
 
 class WorkflowShemaTC(CubicWebTC):
     def test_trinfo_default_format(self):
-         tr = self.session.user.cw_adapt_to('IWorkflowable').fire_transition('deactivate')
-         self.assertEqual(tr.comment_format, 'text/plain')
+        tr = self.request().user.cw_adapt_to('IWorkflowable').fire_transition('deactivate')
+        self.assertEqual(tr.comment_format, 'text/plain')
 
 if __name__ == '__main__':
     unittest_main()