server/test/unittest_undo.py
changeset 9948 798ab1216523
parent 9786 57dbd4450373
child 10000 4352b7ccde04
--- a/server/test/unittest_undo.py	Wed Jul 09 16:35:02 2014 +0200
+++ b/server/test/unittest_undo.py	Tue Sep 16 18:01:51 2014 +0200
@@ -104,13 +104,20 @@
             self.assertEqual(a4.eid_from, self.totoeid)
             self.assertEqual(a4.eid_to, self.toto(cnx).in_group[0].eid)
             self.assertEqual(a4.order, 4)
-            for i, rtype in ((1, 'owned_by'), (2, 'owned_by'),
-                             (4, 'in_state'), (5, 'created_by')):
+            for i, rtype in ((1, 'owned_by'), (2, 'owned_by')):
                 a = actions[i]
                 self.assertEqual(a.action, 'A')
                 self.assertEqual(a.eid_from, self.totoeid)
                 self.assertEqual(a.rtype, rtype)
                 self.assertEqual(a.order, i+1)
+            self.assertEqual(set((actions[4].rtype, actions[5].rtype)),
+                             set(('in_state', 'created_by')))
+            for i in (4, 5):
+                a = actions[i]
+                self.assertEqual(a.action, 'A')
+                self.assertEqual(a.eid_from, self.totoeid)
+                self.assertEqual(a.order, i+1)
+
             # test undoable_transactions
             txs = cnx.undoable_transactions()
             self.assertEqual(len(txs), 1)