def test_should_set_verbose_when_option_is_given(self, mock_set_property):

        self.arguments[OPTION_VERBOSE] = True

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(is_verbose_enabled, True)
    def test_should_set_verbose_when_option_is_given(self, mock_set_property):

        self.arguments[OPTION_VERBOSE] = True

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(is_verbose_enabled, True)
    def test_should_set_no_clean_up_when_option_is_given(self, mock_set_property):

        self.arguments[OPTION_NO_CLEAN_UP] = True

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(is_no_clean_up_enabled, True)
    def test_should_set_config_viewer_only_when_option_is_given(self, mock_set_property):

        self.arguments[OPTION_CONFIG_VIEWER_ONLY] = True

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(is_config_viewer_only_enabled, True)
    def test_should_set_rpm_upload_command_when_option_is_given(self, mock_set_property):

        self.arguments[OPTION_RPM_UPLOAD_CMD] = '/bin/true'

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(get_rpm_upload_command, '/bin/true')
    def test_should_set_no_clean_up_when_option_is_given(
            self, mock_set_property):

        self.arguments[OPTION_NO_CLEAN_UP] = True

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(is_no_clean_up_enabled, True)
    def test_should_set_config_viewer_only_when_option_is_given(
            self, mock_set_property):

        self.arguments[OPTION_CONFIG_VIEWER_ONLY] = True

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(is_config_viewer_only_enabled, True)
    def test_should_set_rpm_upload_command_when_option_is_given(
            self, mock_set_property):

        self.arguments[OPTION_RPM_UPLOAD_CMD] = '/bin/true'

        apply_arguments_to_config(self.arguments)

        mock_set_property.assert_any_call(get_rpm_upload_command, '/bin/true')
    def test_should_not_apply_anything_if_no_options_given(
            self, mock_set_property):

        apply_arguments_to_config(self.arguments)

        self.assertEqual(0, len(mock_set_property.call_args_list))
    def test_should_not_apply_anything_if_no_options_given(self, mock_set_property):

        apply_arguments_to_config(self.arguments)

        self.assertEqual(0, len(mock_set_property.call_args_list))
Пример #11
0
def initialize_configuration(arguments):
    """ Load the configuration file and applies the given arguments to the configuration. """

    load_configuration_file()
    apply_arguments_to_config(arguments)
Пример #12
0
def initialize_configuration(arguments):
    """ Load the configuration file and applies the given arguments to the configuration. """

    load_configuration_file()
    apply_arguments_to_config(arguments)