def test_libs_from_git(self):
    'Test that LIBS_FROM_GIT is auto-generated'
    projects = {'git.openstack.org/openstack/nova': {'required': True, 'short_name': 'nova'}, 'git.openstack.org/openstack/oslo.messaging': {'required': True, 'short_name': 'oslo.messaging'}, 'git.openstack.org/openstack/devstack-plugin': {'required': False, 'short_name': 'devstack-plugin'}}
    project = {'short_name': 'glance'}
    p = dict(base_services=[], base_dir='./test', path=os.path.join(self.tmpdir, 'test.local.conf'), projects=projects, project=project)
    lc = LocalConf(p.get('localrc'), p.get('local_conf'), p.get('base_services'), p.get('services'), p.get('plugins'), p.get('base_dir'), p.get('projects'), p.get('project'))
    lc.write(p['path'])
    lfg = None
    with open(p['path']) as f:
        for line in f:
            if line.startswith('LIBS_FROM_GIT'):
                lfg = line.strip().split('=')[1]
    self.assertEqual('nova,oslo.messaging,glance', lfg)
Test that LIBS_FROM_GIT is auto-generated
def test_libs_from_git(self):
    
    projects = {'git.openstack.org/openstack/nova': {'required': True, 'short_name': 'nova'}, 'git.openstack.org/openstack/oslo.messaging': {'required': True, 'short_name': 'oslo.messaging'}, 'git.openstack.org/openstack/devstack-plugin': {'required': False, 'short_name': 'devstack-plugin'}}
    project = {'short_name': 'glance'}
    p = dict(base_services=[], base_dir='./test', path=os.path.join(self.tmpdir, 'test.local.conf'), projects=projects, project=project)
    lc = LocalConf(p.get('localrc'), p.get('local_conf'), p.get('base_services'), p.get('services'), p.get('plugins'), p.get('base_dir'), p.get('projects'), p.get('project'))
    lc.write(p['path'])
    lfg = None
    with open(p['path']) as f:
        for line in f:
            if line.startswith('LIBS_FROM_GIT'):
                lfg = line.strip().split('=')[1]
    self.assertEqual('nova,oslo.messaging,glance', lfg)