def testGetParentGroupFromMainGroup(self):
        project = XcodeProject(
            {
                'objects': {
                    'project': {'isa': 'PBXProject', 'mainGroup': 'group'},
                    'group': {'isa': 'PBXGroup', 'name': 'group1'}
                },
                'rootObject': 'project'
            })
        group = project._get_parent_group(None)

        self.assertIsNotNone(group)
        self.assertEqual(project.objects[project.objects['project'].mainGroup], group)
    def testGetParentGroupFromMainGroup(self):
        project = XcodeProject({
            'objects': {
                'project': {
                    'isa': 'PBXProject',
                    'mainGroup': 'group'
                },
                'group': {
                    'isa': 'PBXGroup',
                    'name': 'group1'
                }
            },
            'rootObject': 'project'
        })
        group = project._get_parent_group(None)

        self.assertIsNotNone(group)
        self.assertEqual(project.objects[project.objects['project'].mainGroup],
                         group)
Exemple #3
0
    def testGetParentGroupWithID(self):
        project = XcodeProject(self.obj)
        parent = project._get_parent_group('5p')

        self.assertEqual(parent, project.objects['5p'])
Exemple #4
0
    def testGetParentGroupCreateDefault(self):
        project = XcodeProject({'objects': {}})
        group = project._get_parent_group(None)

        self.assertIsNotNone(group)
        self.assertEqual(project.objects[group.get_id()], group)
    def testGetParentGroupWithID(self):
        project = XcodeProject(self.obj)
        parent = project._get_parent_group('5p')

        self.assertEqual(parent, project.objects['5p'])
    def testGetParentGroupCreateDefault(self):
        project = XcodeProject({'objects': {}})
        group = project._get_parent_group(None)

        self.assertIsNotNone(group)
        self.assertEqual(project.objects[group.get_id()], group)