def METHOD_NAME(self):
    with self.assertRaises(TypeError) as cm:
        dateutils.parse_datetime(10)
    self.assertEqual(
        "Invalid type, expected str, got <class 'int'>",
        str(cm.exception)
    )