equal
deleted
inserted
replaced
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') |