server/test/unittest_repository.py
changeset 10285 d14db30b90d6
parent 10280 2cdab5e33542
child 10301 729f36a1bcfa
equal deleted inserted replaced
10284:fb113f9fa7d8 10285:d14db30b90d6
   496             c = cnx.create_entity('Card', title=u'Carte')
   496             c = cnx.create_entity('Card', title=u'Carte')
   497             cnx.create_entity('Personne', nom=u'Vincent', fiche=c)
   497             cnx.create_entity('Personne', nom=u'Vincent', fiche=c)
   498             cnx.create_entity('Personne', nom=u'Florent', fiche=c)
   498             cnx.create_entity('Personne', nom=u'Florent', fiche=c)
   499             cnx.commit()
   499             cnx.commit()
   500             self.assertEqual(len(c.reverse_fiche), 1)
   500             self.assertEqual(len(c.reverse_fiche), 1)
       
   501 
       
   502     def test_delete_computed_relation_nonregr(self):
       
   503         with self.admin_access.repo_cnx() as cnx:
       
   504             c = cnx.create_entity('Personne', nom=u'Adam', login_user=cnx.user.eid)
       
   505             cnx.commit()
       
   506             c.cw_delete()
       
   507             cnx.commit()
   501 
   508 
   502     def test_cw_set_in_before_update(self):
   509     def test_cw_set_in_before_update(self):
   503         # local hook
   510         # local hook
   504         class DummyBeforeHook(Hook):
   511         class DummyBeforeHook(Hook):
   505             __regid__ = 'dummy-before-hook'
   512             __regid__ = 'dummy-before-hook'