Beispiel #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'))
Beispiel #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'))
Beispiel #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"))
Beispiel #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'))
Beispiel #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'))
Beispiel #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"))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))
Beispiel #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'))