Example #1
0
def test_edit_voicemail_with_same_number_and_context(first_voicemail, second_voicemail):
    response = confd.voicemails(first_voicemail['id']).put(number=second_voicemail['number'],
                                                           context=second_voicemail['context'])
    response.assert_match(400, e.resource_exists('Voicemail'))
Example #2
0
def test_create_2_call_permissions_with_same_name(call_permission):
    response = confd.callpermissions.post(name=call_permission['name'])
    response.assert_match(400, e.resource_exists('CallPermission'))
Example #3
0
def test_edit_voicemail_with_same_number_and_context(first_voicemail, second_voicemail):
    response = confd.voicemails(first_voicemail["id"]).put(
        number=second_voicemail["number"], context=second_voicemail["context"]
    )
    response.assert_match(400, e.resource_exists("Voicemail"))
Example #4
0
def test_create_voicemail_with_same_number_and_context(voicemail):
    response = confd.voicemails.post(name='testvoicemail',
                                     number=voicemail['number'],
                                     context=voicemail['context'])
    response.assert_match(400, e.resource_exists('Voicemail'))
Example #5
0
def test_edit_device_with_same_mac(first_device, second_device):
    response = confd.devices(first_device['id']).put(mac=second_device['mac'])
    response.assert_match(400, e.resource_exists('Device'))
Example #6
0
def test_create_voicemail_with_same_number_and_context(voicemail):
    response = confd.voicemails.post(name="testvoicemail", number=voicemail["number"], context=voicemail["context"])
    response.assert_match(400, e.resource_exists("Voicemail"))
Example #7
0
def test_edit_device_with_same_mac(first_device, second_device):
    response = confd.devices(first_device['id']).put(mac=second_device['mac'])
    response.assert_match(400, e.resource_exists('Device'))
Example #8
0
def test_when_updating_custom_with_interface_that_already_exists_then_error_raised(custom, duplicate):
    response = confd.endpoints.custom(custom['id']).put(interface=duplicate['interface'])
    response.assert_match(400, e.resource_exists('CustomEndpoint'))
Example #9
0
def test_put_email_already_exists_then_error_raised(_, user):
    response = confd.users(user['uuid']).put(email='*****@*****.**')
    response.assert_match(400, e.resource_exists('User'))
Example #10
0
def test_create_2_devices_with_same_mac(device):
    response = confd.devices.post(mac=device['mac'])
    response.assert_match(400, e.resource_exists('Device'))
Example #11
0
def test_post_email_already_exists_then_error_raised(user):
    response = confd.users.post(firstname='bob', email='*****@*****.**')
    response.assert_match(400, e.resource_exists('User'))
Example #12
0
def test_create_sip_with_username_already_taken(sip):
    response = confd.endpoints.sip.post(username="******")
    response.assert_match(400, e.resource_exists('SIPEndpoint'))
Example #13
0
def test_create_2_extensions_with_same_exten(extension):
    response = confd.extensions.post(context=extension['context'],
                                       exten=extension['exten'])
    response.assert_match(400, e.resource_exists('Extension'))
Example #14
0
def test_edit_call_permission_with_same_name(first_call_permission, second_call_permission):
    response = confd.callpermissions(first_call_permission['id']).put(name=second_call_permission['name'])
    response.assert_match(400, e.resource_exists('CallPermission'))
Example #15
0
def test_create_2_devices_with_same_mac(device):
    response = confd.devices.post(mac=device['mac'])
    response.assert_match(400, e.resource_exists('Device'))
Example #16
0
def test_create_2_extensions_with_same_exten(extension):
    response = confd.extensions.post(context=extension['context'],
                                     exten=extension['exten'])
    response.assert_match(400, e.resource_exists('Extension'))
Example #17
0
def test_given_interface_already_exists_then_error_raised():
    response = confd.endpoints.custom.post(interface='custom/duplicate')
    response.assert_ok()

    response = confd.endpoints.custom.post(interface='custom/duplicate')
    response.assert_match(400, e.resource_exists('CustomEndpoint'))