Esempio n. 1
0
    def test_validate_edit(self,
                           validate_missing_parameters,
                           validate_invalid_parameters,
                           validate_context_exists,
                           validate_extension_available_for_edit,
                           validate_extension_in_range):

        extension = Mock()

        validator.validate_edit(extension)

        validate_missing_parameters.assert_called_once_with(extension)
        validate_invalid_parameters.assert_called_once_with(extension)
        validate_context_exists.assert_called_once_with(extension)
        validate_extension_available_for_edit.assert_called_once_with(extension)
        validate_extension_in_range.assert_called_once_with(extension)
Esempio n. 2
0
    def test_validate_edit(self, validate_missing_parameters,
                           validate_invalid_parameters,
                           validate_context_exists,
                           validate_extension_available_for_edit,
                           validate_extension_in_range):

        extension = Mock()

        validator.validate_edit(extension)

        validate_missing_parameters.assert_called_once_with(extension)
        validate_invalid_parameters.assert_called_once_with(extension)
        validate_context_exists.assert_called_once_with(extension)
        validate_extension_available_for_edit.assert_called_once_with(
            extension)
        validate_extension_in_range.assert_called_once_with(extension)
Esempio n. 3
0
def edit(extension):
    validator.validate_edit(extension)
    dao.edit(extension)
    notifier.edited(extension)