devtools/testlib.py
branchstable
changeset 9594 e549ef4be945
parent 9440 6880674c1a26
child 9635 aaf099172bb9
equal deleted inserted replaced
9593:48a84fb4f301 9594:e549ef4be945
   534                 erschema.set_action_permissions(action, permissions)
   534                 erschema.set_action_permissions(action, permissions)
   535 
   535 
   536     def assertModificationDateGreater(self, entity, olddate):
   536     def assertModificationDateGreater(self, entity, olddate):
   537         entity.cw_attr_cache.pop('modification_date', None)
   537         entity.cw_attr_cache.pop('modification_date', None)
   538         self.assertTrue(entity.modification_date > olddate)
   538         self.assertTrue(entity.modification_date > olddate)
   539 
       
   540     def assertItemsEqual(self, it1, it2, *args, **kwargs):
       
   541         it1 = set(getattr(x, 'eid', x) for x in it1)
       
   542         it2 = set(getattr(x, 'eid', x) for x in it2)
       
   543         super(CubicWebTC, self).assertItemsEqual(it1, it2, *args, **kwargs)
       
   544 
   539 
   545     def assertMessageEqual(self, req, params, expected_msg):
   540     def assertMessageEqual(self, req, params, expected_msg):
   546         msg = req.session.data[params['_cwmsgid']]
   541         msg = req.session.data[params['_cwmsgid']]
   547         self.assertEqual(expected_msg, msg)
   542         self.assertEqual(expected_msg, msg)
   548 
   543