def METHOD_NAME(self):
    with self.assertRaises(ValueError) as err:
        answer("What is?")
    self.assertEqual(type(err.exception), ValueError)
    self.assertEqual(err.exception.args[0], "syntax error")