Пример #1
0
 def test_default_environment_no_default(self, menvironments):
     environments_yaml = """
     environments:
       gojuju1:
         type: cloud
         access-key: xxx
         secret-key: yyy
         control-bucket: gojuju-xyxyz
         admin-secret: zyxyx
         default-series: world"""
     menvironments.return_value = yaml.safe_load(environments_yaml)
     self.assertEqual('gojuju1', default_environment())
Пример #2
0
 def test_default_environment_no_default(self, menvironments):
     environments_yaml = """
     environments:
       gojuju1:
         type: cloud
         access-key: xxx
         secret-key: yyy
         control-bucket: gojuju-xyxyz
         admin-secret: zyxyx
         default-series: world"""
     menvironments.return_value = yaml.safe_load(environments_yaml)
     self.assertEqual('gojuju1', helpers.default_environment())
Пример #3
0
 def test_default_environment(self, menvironments):
     menvironments.return_value = yaml.safe_load(RAW_ENVIRONMENTS_YAML)
     default = default_environment()
     self.assertEqual('gojuju', default)
Пример #4
0
 def test_default_environment(self, menvironments):
     menvironments.return_value = yaml.safe_load(RAW_ENVIRONMENTS_YAML)
     default = helpers.default_environment()
     self.assertEqual('gojuju', default)
Пример #5
0
 def test_default_env_cache(self, juju):
     juju.return_value = 'test-env'
     self.assertEqual(default_environment(), 'test-env')
     juju.return_value = 'new-env'
     self.assertEqual(default_environment(), 'test-env')