server/test/unittest_undo.py
changeset 10210 633d85ba9f72
parent 10207 5ec5d17b5e5b
child 10260 0e61be7bff10
equal deleted inserted replaced
10209:4c64a41c0a1d 10210:633d85ba9f72
   236                 "Can't restore object relation fiche to entity "
   236                 "Can't restore object relation fiche to entity "
   237                 "%s which is already linked using this relation." % p.eid])
   237                 "%s which is already linked using this relation." % p.eid])
   238             cnx.commit()
   238             cnx.commit()
   239             p.cw_clear_all_caches()
   239             p.cw_clear_all_caches()
   240             self.assertEqual(p.fiche[0].eid, c2.eid)
   240             self.assertEqual(p.fiche[0].eid, c2.eid)
       
   241             # we restored the card
       
   242             self.assertTrue(cnx.entity_from_eid(c.eid))
   241 
   243 
   242     def test_undo_deletion_integrity_2(self):
   244     def test_undo_deletion_integrity_2(self):
   243         with self.admin_access.client_cnx() as cnx:
   245         with self.admin_access.client_cnx() as cnx:
   244             # test validation error raised if we can't restore a required relation
   246             # test validation error raised if we can't restore a required relation
   245             g = cnx.create_entity('CWGroup', name=u'staff')
   247             g = cnx.create_entity('CWGroup', name=u'staff')