use "with self.assertRaises" pattern