def METHOD_NAME(self):
    from ctypes import c_char_p, byref
    # c_char_p.from_param on a Python String packs the string
    # into a cparam object
    s = "123"
    self.assertIs(c_char_p.from_param(s)._obj, s)
    # new in 0.9.1: convert (encode) unicode to ascii
    self.assertEqual(c_char_p.from_param(u"123")._obj, "123")
    self.assertRaises(UnicodeEncodeError, c_char_p.from_param, u"123\377")
    self.assertRaises(TypeError, c_char_p.from_param, 42)
    # calling c_char_p.from_param with a c_char_p instance
    # returns the argument itself:
    a = c_char_p("123")
    self.assertIs(c_char_p.from_param(a), a)