Esempio n. 1
0
 def test__get_setting_command_invalid_key(self):
     with InTemporaryDirectory():
         with open('deploy.conf', 'w') as write_handle:
             write_handle.write('[global]\nname=foo\n')
         sys.argv = ['invirtualenv', 'get_setting', 'global', 'namez']
         rc, output = main(test=True)
         self.assertEqual(rc, 1)
         self.assertEqual(output, '')
Esempio n. 2
0
 def test__main__list_plugins(self):
     with InTemporaryDirectory():
         with open('deploy.conf', 'w') as write_handle:
             write_handle.write('[global]\nname=foo\n')
         sys.argv = ['invirtualenv', 'list_plugins']
         rc, output = main(test=True)
         self.assertEqual(rc, 0)
         for plugin in package_formats():
             self.assertIn(plugin, output)
Esempio n. 3
0
 def test__create_package_config__parsed_deploy_conf__nooutfile(self):
     with InTemporaryDirectory():
         with open('deploy.conf', 'w') as write_handle:
             write_handle.write('[global]\ntest={{TESTVAR}}\n')
         os.environ['TESTVAR'] = 'foo'
         sys.argv = [
             'invirtualenv', 'create_package_config', 'parsed_deploy_conf'
         ]
         rc, output = main(test=True)
         self.assertTrue(os.path.exists('deploy.conf.parsed'))
         self.assertEqual(rc, 0)