def test_delete(self, validate_extension_exists, validate_extension_not_associated): extension = Mock(Extension, id=0) validator.validate_delete(extension) validate_extension_exists.assert_called_once_with(extension) validate_extension_not_associated.assert_called_once_with(extension.id)
def test_delete(self, validate_extension_exists, validate_not_associated_to_line): extension = Mock(Extension) validator.validate_delete(extension) validate_extension_exists.assert_called_once_with(extension) validate_not_associated_to_line.assert_called_once_with(extension)
def delete(extension): validator.validate_delete(extension) dao.delete(extension) notifier.deleted(extension)