equal
deleted
inserted
replaced
373 self.assertUndoTransaction(cnx, txuuid) |
373 self.assertUndoTransaction(cnx, txuuid) |
374 cnx.commit() |
374 cnx.commit() |
375 p.cw_clear_all_caches() |
375 p.cw_clear_all_caches() |
376 self.assertFalse(p.fiche) |
376 self.assertFalse(p.fiche) |
377 |
377 |
|
378 def test_undo_inline_rel_delete_ko(self): |
|
379 with self.admin_access.client_cnx() as cnx: |
|
380 c = cnx.create_entity('Card', title=u'hop', content=u'hop') |
|
381 txuuid = cnx.commit() |
|
382 p = cnx.create_entity('Personne', nom=u'louis', fiche=c) |
|
383 cnx.commit() |
|
384 integrityerror = self.repo.sources_by_uri['system'].dbhelper.dbapi_module.IntegrityError |
|
385 with self.assertRaises(integrityerror): |
|
386 cnx.undo_transaction(txuuid) |
|
387 |
|
388 |
378 def test_undo_inline_rel_add_ko(self): |
389 def test_undo_inline_rel_add_ko(self): |
379 """Undo add relation Personne (?) fiche (?) Card |
390 """Undo add relation Personne (?) fiche (?) Card |
380 |
391 |
381 Caution processed by `_undo_u`, not `_undo_a` !""" |
392 Caution processed by `_undo_u`, not `_undo_a` !""" |
382 with self.admin_access.client_cnx() as cnx: |
393 with self.admin_access.client_cnx() as cnx: |