コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
    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)
コード例 #4
0
    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)
コード例 #5
0
    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')
コード例 #6
0
    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)
コード例 #7
0
    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)
コード例 #8
0
    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')
コード例 #9
0
    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))
コード例 #10
0
    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)