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)
def test_email_only(self): person = '*****@*****.**' formatted_person = parse_helpers.format_name(person) self.assertEqual(formatted_person, person)
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)
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)