Commit f8a306b9 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

DeprecationWarning: Please use assertRaisesRegex instead.

parent eba09a2ac61d
...@@ -101,17 +101,17 @@ class RequestCWTC(CubicWebTC): ...@@ -101,17 +101,17 @@ class RequestCWTC(CubicWebTC):
users = list(rset.entities()) users = list(rset.entities())
self.assertEqual(len(users), 2) self.assertEqual(len(users), 2)
with self.assertRaisesRegexp( with self.assertRaisesRegex(
KeyError, "^'chapeau not in CWUser subject relations'$" KeyError, "^'chapeau not in CWUser subject relations'$"
): ):
req.find('CWUser', chapeau=u"melon") req.find('CWUser', chapeau=u"melon")
with self.assertRaisesRegexp( with self.assertRaisesRegex(
KeyError, "^'buddy not in CWUser object relations'$" KeyError, "^'buddy not in CWUser object relations'$"
): ):
req.find('CWUser', reverse_buddy=users[0]) req.find('CWUser', reverse_buddy=users[0])
with self.assertRaisesRegexp( with self.assertRaisesRegex(
NotImplementedError, '^in_group: list of values are not supported$' NotImplementedError, '^in_group: list of values are not supported$'
): ):
req.find('CWUser', in_group=[1, 2]) req.find('CWUser', in_group=[1, 2])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment