Exemple #1
0
 def test_get_rsync_push(self):
     buildout = get_buildout_config(self._buildout_cfg)
     eggs = get_buildout_eggs(buildout)
     api.env.user = '******'
     api.env.host = 'bar'
     with get_rsync_push(eggs) as cmd:
         self.assertTrue(cmd.endswith(
             '/var/buildout/eggs-directory '
             'foo@bar:/var/buildout/eggs-directory')
         )
Exemple #2
0
 def test_get_buildout_eggs(self):
     buildout = get_buildout_config(self._buildout_cfg)
     eggs = get_buildout_eggs(buildout)
     self.assertEqual(eggs, [
         '/var/buildout/eggs-directory/paramiko-1.12.4-py2.7.egg',
         '/var/buildout/eggs-directory/ecdsa-0.11-py2.7.egg',
         '/var/buildout/eggs-directory/setuptools-3.6-py2.7.egg',
         '/var/buildout/eggs-directory/pycrypto-2.6.1-py2.7-macosx-10.9'
         '-intel.egg',
         '/var/buildout/eggs-directory/zc.buildout-2.2.1-py2.7.egg',
         '/var/buildout/eggs-directory/aja-1.0.0-py2.7.egg',
         '/var/buildout/eggs-directory/Fabric-1.8.3-py2.7.egg'
     ])
Exemple #3
0
 def run(self, *args, **kwargs):
     buildout_directory = get_buildout_directory(api.env.host)
     buildout = get_buildout_config(
         os.path.join(buildout_directory, 'buildout.cfg')
     )
     keys = api.env.keys()
     config = dict([
         (key.replace('-', '_'), value) for key, value
         in buildout.get('aja', {}).items() if key in keys
     ])
     if 'host_string' in config:
         config.update(parse_host_string(config.get('host_string')))
     config['buildout'] = buildout
     directory = buildout.get('buildout', {}).get('directory')
     with settings(**config):
         with lcd(directory):
             return self.func(*args, **kwargs)
Exemple #4
0
 def test_get_buildout_parts(self):
     buildout = get_buildout_config(self._buildout_cfg)
     parts = get_buildout_parts(buildout)
     self.assertEqual(parts, ['fab'])
Exemple #5
0
 def test_get_buildout_config(self):
     buildout = get_buildout_config(self._buildout_cfg)
     self.assertIn('buildout', buildout)
     self.assertIn('fab', buildout)
Exemple #6
0
 def test_memoize(self):
     get_buildout_config(self._buildout_cfg)
     self.assertTrue(len(_memo) > 0)