def test_parse_email(self):
        """Testcase for the function `parse_email()`."""
        specs = [ET.fromstring(x) for x in generate_email_specs()]
        emails = generate_emails()

        self.assertEqual(parse_email(specs[0]), emails[0])
        self.assertEqual(parse_email(specs[1]), emails[1])
        self.assertEqual(parse_email(specs[2]), emails[2])
Exemple #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()