def test_create_environment_variable_attribute_no_default(self):

        setting = {
            "type": "environment_variable",
             "from_attribute": "test_from",
             "to_attribute": "test_to"
        }

        with self.assertRaises(EnvironmentSettingNotFoundException):
            output = EnvironmentConfig.create_environment_variable_attribute(setting)
Exemplo n.º 2
0
    def test_create_environment_variable_attribute_no_default(self):

        setting = {
            "type": "environment_variable",
            "from_attribute": "test_from",
            "to_attribute": "test_to"
        }

        with self.assertRaises(EnvironmentSettingNotFoundException):
            output = EnvironmentConfig.create_environment_variable_attribute(
                setting)
    def test_create_environment_variable_attribute_dont_use_default(self):
        """ stuff """

        setting = {
            "type": "environment_variable",
             "from_attribute": "test_from",
             "to_attribute": "test_to",
             "default": "another_value"
        }

        output = EnvironmentConfig.create_environment_variable_attribute(setting)
        self.assertEqual(output, "some_value")
Exemplo n.º 4
0
    def test_create_environment_variable_attribute_dont_use_default(self):
        """ stuff """

        setting = {
            "type": "environment_variable",
            "from_attribute": "test_from",
            "to_attribute": "test_to",
            "default": "another_value"
        }

        output = EnvironmentConfig.create_environment_variable_attribute(
            setting)
        self.assertEqual(output, "some_value")