[wf/test] fix tests broken by changes from another patch which have slipped there
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 09 Jan 2013 21:48:59 +0100
changeset 8646 82c7c2e0f69f
parent 8645 310040c668c0
child 8653 ad5a3ff57255
[wf/test] fix tests broken by changes from another patch which have slipped there
entities/test/unittest_wfobjs.py
--- a/entities/test/unittest_wfobjs.py	Wed Jan 09 16:06:20 2013 +0100
+++ b/entities/test/unittest_wfobjs.py	Wed Jan 09 21:48:59 2013 +0100
@@ -212,7 +212,7 @@
         req = self.request()
         iworkflowable = req.entity_from_eid(self.member.eid).cw_adapt_to('IWorkflowable')
         iworkflowable.fire_transition('deactivate')
-        req.cu.commit()
+        cnx.commit()
         with self.assertRaises(ValidationError) as cm:
             iworkflowable.fire_transition('activate')
         self.assertEqual(cm.exception.errors, {'by_transition-subject': "transition may not be fired"})
@@ -624,7 +624,7 @@
     def test_transition_checking3(self):
         with self.login('stduser') as cnx:
             session = self.session
-            user = cnx.user(session)
+            user = self.user()
             iworkflowable = user.cw_adapt_to('IWorkflowable')
             iworkflowable.fire_transition('deactivate')
             session.commit()