Replace 'with assertRaises' by self.assertRaisesMsg()