--- a/devtools/testlib.py Thu May 26 08:12:42 2011 +0200
+++ b/devtools/testlib.py Thu May 26 08:32:15 2011 +0200
@@ -500,6 +500,10 @@
it2 = set(getattr(x, 'eid', x) for x in it2)
super(CubicWebTC, self).assertItemsEqual(it1, it2, *args, **kwargs)
+ def assertMessageEqual(self, req, params, msg):
+ msg = req.session.data[params['_cwmsgid']]
+ self.assertEqual(msg, msg)
+
# workflow utilities #######################################################
def assertPossibleTransitions(self, entity, expected):
@@ -724,8 +728,7 @@
self.assertEqual(session.login, origsession.login)
self.assertEqual(session.anonymous_session, False)
self.assertEqual(path, 'view')
- msg = req.session.data[params['_cwmsgid']]
- self.assertEqual(msg, 'welcome %s !' % req.user.login)
+ self.assertMessageEqual(req, params, 'welcome %s !' % req.user.login)
def assertAuthFailure(self, req, nbsessions=0):
self.app.connect(req)