示例#1
0
 def test_last_comma_first(self):
     person = 'Person, Test M.'
     formatted_person = parse_helpers.format_name(person)
     answer = 'Name: Test M. Person'
     self.assertEqual(formatted_person, answer)
示例#2
0
 def test_email_only(self):
     person = '*****@*****.**'
     formatted_person = parse_helpers.format_name(person)
     self.assertEqual(formatted_person, person)
示例#3
0
 def test_name_phone_with_space(self):
     person = 'Test Person 1234567890'
     formatted_person = parse_helpers.format_name(person)
     answer = 'Name: Test Person, Phone: 1234567890'
     self.assertEqual(formatted_person, answer)
示例#4
0
 def test_normal(self):
     person = 'Tina L. Watsontarver, Contract Specialist, Email [email protected], Phone (123)456-7890'
     formatted_person = parse_helpers.format_name(person)
     answer = 'Name: Tina L. Watsontarver, Contract Specialist, Email [email protected], Phone (123)456-7890'
     self.assertEqual(formatted_person, answer)
示例#5
0
 def test_last_comma_first(self):
     person = 'Person, Test M.'
     formatted_person = parse_helpers.format_name(person)
     answer = 'Name: Test M. Person'
     self.assertEqual(formatted_person, answer)
示例#6
0
 def test_name_phone_with_space(self):
     person = 'Test Person 1234567890'
     formatted_person = parse_helpers.format_name(person)
     answer = 'Name: Test Person, Phone: 1234567890'
     self.assertEqual(formatted_person, answer)
示例#7
0
 def test_email_only(self):
     person = '*****@*****.**'
     formatted_person = parse_helpers.format_name(person)
     self.assertEqual(formatted_person, person)
示例#8
0
 def test_normal(self):
     person = 'Tina L. Watsontarver, Contract Specialist, Email [email protected], Phone (123)456-7890'
     formatted_person = parse_helpers.format_name(person)
     answer = 'Name: Tina L. Watsontarver, Contract Specialist, Email [email protected], Phone (123)456-7890'
     self.assertEqual(formatted_person, answer)