devtools/testlib.py
branchstable
changeset 7763 31210a2ead63
parent 7441 b70f4f4c8620
child 7780 a1d5365fefc1
equal deleted inserted replaced
7760:75d80ef524c7 7763:31210a2ead63
   491             for obj in appobjects:
   491             for obj in appobjects:
   492                 self.vreg.unregister(obj)
   492                 self.vreg.unregister(obj)
   493 
   493 
   494     def assertModificationDateGreater(self, entity, olddate):
   494     def assertModificationDateGreater(self, entity, olddate):
   495         entity.cw_attr_cache.pop('modification_date', None)
   495         entity.cw_attr_cache.pop('modification_date', None)
   496         self.failUnless(entity.modification_date > olddate)
   496         self.assertTrue(entity.modification_date > olddate)
   497 
   497 
   498     def assertItemsEqual(self, it1, it2, *args, **kwargs):
   498     def assertItemsEqual(self, it1, it2, *args, **kwargs):
   499         it1 = set(getattr(x, 'eid', x) for x in it1)
   499         it1 = set(getattr(x, 'eid', x) for x in it1)
   500         it2 = set(getattr(x, 'eid', x) for x in it2)
   500         it2 = set(getattr(x, 'eid', x) for x in it2)
   501         super(CubicWebTC, self).assertItemsEqual(it1, it2, *args, **kwargs)
   501         super(CubicWebTC, self).assertItemsEqual(it1, it2, *args, **kwargs)