server/test/unittest_repository.py
branchstable
changeset 6188 e1c9610b2360
parent 5890 141b935a38fc
child 6208 07b176640a8c
equal deleted inserted replaced
6187:348c7d93cda3 6188:e1c9610b2360
   383         rset = self.execute('Any P WHERE A todo_by P, A eid %(x)s',
   383         rset = self.execute('Any P WHERE A todo_by P, A eid %(x)s',
   384                             {'x': note.eid})
   384                             {'x': note.eid})
   385         self.assertEquals(len(rset), 1)
   385         self.assertEquals(len(rset), 1)
   386         self.assertEquals(rset.rows[0][0], p2.eid)
   386         self.assertEquals(rset.rows[0][0], p2.eid)
   387 
   387 
       
   388     def test_delete_if_object_inlined_singlecard(self):
       
   389         req = self.request()
       
   390         c = req.create_entity('Card', title=u'Carte')
       
   391         req.create_entity('Personne', nom=u'Vincent', fiche=c)
       
   392         req.create_entity('Personne', nom=u'Florent', fiche=c)
       
   393         self.commit()
       
   394         self.assertEquals(len(c.reverse_fiche), 1)
   388 
   395 
   389     def test_set_attributes_in_before_update(self):
   396     def test_set_attributes_in_before_update(self):
   390         # local hook
   397         # local hook
   391         class DummyBeforeHook(Hook):
   398         class DummyBeforeHook(Hook):
   392             __regid__ = 'dummy-before-hook'
   399             __regid__ = 'dummy-before-hook'