def test_parse_phone_number(self):
        """Testcase for the function `parse_phone_number()`."""
        specs = [ET.fromstring(x) for x in generate_phone_number_specs()]
        numbers = generate_phone_numbers()

        self.assertEqual(parse_phone_number(specs[0]), numbers[0])
        self.assertEqual(parse_phone_number(specs[1]), numbers[1])
        self.assertEqual(parse_phone_number(specs[2]), numbers[2])
Ejemplo n.º 2
0
 def setUp(self):
     self.person1, self.person2, self.person3 = generate_persons()
     self.email1, self.email2, self.email3 = generate_emails()
     self.phone1, self.phone2, self.phone3 = generate_phone_numbers()