server/test/unittest_repository.py
changeset 5159 2543cfa5d54a
parent 5126 c869d8e7d166
child 5174 78438ad513ca
child 5213 8604000bf3b2
equal deleted inserted replaced
5158:5e9055b8c10a 5159:2543cfa5d54a
   394             def __call__(self):
   394             def __call__(self):
   395                 # set_attributes is forbidden within before_add_entity()
   395                 # set_attributes is forbidden within before_add_entity()
   396                 self.entity.set_attributes(alias=u'foo')
   396                 self.entity.set_attributes(alias=u'foo')
   397         with self.temporary_appobjects(DummyBeforeHook):
   397         with self.temporary_appobjects(DummyBeforeHook):
   398             req = self.request()
   398             req = self.request()
   399             self.assertRaises(RepositoryError, req.create_entity,
   399             # XXX will fail with python -O
       
   400             self.assertRaises(AssertionError, req.create_entity,
   400                               'EmailAddress', address=u'a@b.fr')
   401                               'EmailAddress', address=u'a@b.fr')
   401 
   402 
   402 
   403 
   403 class DataHelpersTC(CubicWebTC):
   404 class DataHelpersTC(CubicWebTC):
   404 
   405