예제 #1
0
 def test_make_ascii(self):
     assert_equal(
         utils.make_ascii("foo bar .,?;'!@#$%^&*()"),
         "foo bar .,?;'!@#$%^&*()"
     )
     assert_equal(
         utils.make_ascii('äèîõù'),
         'aeiou'
     )
예제 #2
0
파일: model.py 프로젝트: tOlorun/whoswho
    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)
예제 #3
0
파일: model.py 프로젝트: rliebz/whoswho
    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)