Exemple #1
0
    def test_genealogy_contains_id(self):
        """
        """
        enterprise1 = Enterprise(id='4', name='enterprise')
        enterprise1.id = '1'
        employee = Employee()
        employee.id = '2'
        employee.parent_object = enterprise1

        self.assertTrue(employee.genealogy_contains_id('1'))
Exemple #2
0
    def test_genealogic_ids(self):
        """
        """
        enterprise1 = Enterprise(id='4', name='enterprise')
        enterprise1.id = '1'
        employee = Employee()
        employee.id = '2'
        employee.parent_object = enterprise1

        self.assertEquals(employee.genealogic_ids(), ['2', '1'])