server/test/unittest_hooksmanager.py
changeset 2809 04fa75d43af4
parent 2773 b2530e3e0afb
equal deleted inserted replaced
2808:497424219fb0 2809:04fa75d43af4
   168     events = ('whatever', 'another')
   168     events = ('whatever', 'another')
   169     accepts = ('Societe', 'Division')
   169     accepts = ('Societe', 'Division')
   170 
   170 
   171 class HookTC(CubicWebTC):
   171 class HookTC(CubicWebTC):
   172     def test_inheritance(self):
   172     def test_inheritance(self):
   173         self.assertEquals(list(MyHook.register_to()),
   173         self.assertEquals(list(MyHook.register_to(self.schema)),
   174                           zip(repeat('whatever'), ('Societe', 'Division', 'SubDivision'))
   174                           zip(repeat('whatever'), ('Societe', 'Division', 'SubDivision'))
   175                           + zip(repeat('another'), ('Societe', 'Division', 'SubDivision')))
   175                           + zip(repeat('another'), ('Societe', 'Division', 'SubDivision')))
   176 
   176 
   177 
   177 
   178 if __name__ == '__main__':
   178 if __name__ == '__main__':