Exemple #1
0
    def test_edit(self, validate_edit, extension_dao_edit, extension_notifier_edited):
        exten = '1000'
        context = 'toto'

        extension = Extension(id=1,
                              exten=exten,
                              context=context)

        extension_dao_edit.return_value = extension

        extension_services.edit(extension)

        validate_edit.assert_called_once_with(extension)
        extension_dao_edit.assert_called_once_with(extension)
        extension_notifier_edited.assert_called_once_with(extension)
Exemple #2
0
    def test_edit(self, validate_edit, extension_dao_edit, extension_notifier_edited):
        exten = '1000'
        context = 'toto'

        extension = Extension(id=1,
                              exten=exten,
                              context=context)

        extension_dao_edit.return_value = extension

        extension_services.edit(extension)

        validate_edit.assert_called_once_with(extension)
        extension_dao_edit.assert_called_once_with(extension)
        extension_notifier_edited.assert_called_once_with(extension)
Exemple #3
0
def edit(extensionid):
    data = document.parse(request)
    extension = extension_services.get(extensionid)
    formatter.update_dict_model(data, extension)
    extension_services.edit(extension)
    return make_response('', 204)