def test_make_ascii(self): assert_equal( utils.make_ascii("foo bar .,?;'!@#$%^&*()"), "foo bar .,?;'!@#$%^&*()" ) assert_equal( utils.make_ascii('äèîõù'), 'aeiou' )
def __init__(self, fullname): ascii_name = make_ascii(fullname) super(Name, self).__init__(ascii_name) # Format after parsing to preserve parsing logic self.title = strip_punctuation(self.title) self.first = strip_punctuation(self.first) self.middle = strip_punctuation(self.middle) self.last = strip_punctuation(self.last) self.suffix = strip_punctuation(self.suffix) self.nickname = strip_punctuation(self.nickname)