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())
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())
def test_default_environment(self, menvironments): menvironments.return_value = yaml.safe_load(RAW_ENVIRONMENTS_YAML) default = default_environment() self.assertEqual('gojuju', default)
def test_default_environment(self, menvironments): menvironments.return_value = yaml.safe_load(RAW_ENVIRONMENTS_YAML) default = helpers.default_environment() self.assertEqual('gojuju', default)
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')