.message is not an essential part of the test.
args = self.fixtype(args)
with self.assertRaises(exc) as cm:
getattr(obj, methodname)(*args)
- self.assertNotEqual(cm.exception.message, '')
+ self.assertNotEqual(cm.exception.args[0], '')
# call object.method(*args) without any checks
def checkcall(self, object, methodname, *args):
def checkraises(self, exc, obj, methodname, *args):
with self.assertRaises(exc) as cm:
getattr(string, methodname)(obj, *args)
- self.assertNotEqual(cm.exception.message, '')
+ self.assertNotEqual(cm.exception.args[0], '')
def checkcall(self, object, methodname, *args):
getattr(string, methodname)(object, *args)
# we don't fix the arguments, because UserString can't cope with it
with self.assertRaises(exc) as cm:
getattr(obj, methodname)(*args)
- self.assertNotEqual(cm.exception.message, '')
+ self.assertNotEqual(cm.exception.args[0], '')
def checkcall(self, object, methodname, *args):
object = self.fixtype(object)