def test_parse_person(self):
        """Testcase for the function `parse_person()`."""
        specs = [ET.fromstring(x) for x in generate_person_specs()]
        persons = generate_persons()
        ids = generate_person_ids()

        self.assertEqual(parse_person(specs[0]), (ids[0], persons[0]))
        self.assertEqual(parse_person(specs[1]), (ids[1], persons[1]))
        self.assertEqual(parse_person(specs[2]), (ids[2], persons[2]))
Ejemplo n.º 2
0
    def setUp(self):
        self.database = SerloDatabase("sqlite:///:memory:")
        self.person1, self.person2, self.person3 = generate_persons()[0:3]

        self.persons = [self.person1, self.person2, self.person3]

        self.project1, self.project2, \
                self.unit1, self.unit2 = generate_working_units()[0:4]

        self.units = [self.project1, self.project2, self.unit1, self.unit2]
Ejemplo n.º 3
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()
Ejemplo n.º 4
0
    def setUp(self):
        self.project1, self.project2, \
                self.unit1, self.unit2 = generate_working_units()

        self.person1, self.person2, self.person3 = generate_persons()