Esempio n. 1
0
def when_i_edit_voicemail_via_restapi(step, extension):
    parameters = _extract_voicemail_info_to_restapi(step.hashes[0])
    number, context = func.extract_number_and_context_from_extension(extension)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(
        number, context)
    world.response = voicemail_action_restapi.edit_voicemail(
        voicemail_id, parameters)
Esempio n. 2
0
def when_i_link_user_group1_with_voicemail_group2_via_restapi(
        step, fullname, voicemail):
    user = user_helper.find_user_by_name(fullname)
    number, context = func.extract_number_and_context_from_extension(voicemail)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(
        number, context)

    world.response = voicemail_link_action_restapi.link_voicemail(
        user.id, voicemail_id)
Esempio n. 3
0
def _new_voicemail_destination(number_context):
    number, _, context = number_context.partition("@")
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(number, context)
    return VoicemailDestination(voicemail_id)
Esempio n. 4
0
def when_i_link_user_group1_with_voicemail_group2_via_restapi(step, fullname, voicemail):
    user = user_helper.find_user_by_name(fullname)
    number, context = func.extract_number_and_context_from_extension(voicemail)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(number, context)

    world.response = voicemail_link_action_restapi.link_voicemail(user.id, voicemail_id)
Esempio n. 5
0
def when_i_delete_voicemail_with_number_group1_via_restapi(step, extension):
    number, context = func.extract_number_and_context_from_extension(extension)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(number, context)
    world.response = voicemail_action_restapi.delete_voicemail(voicemail_id)
Esempio n. 6
0
def when_i_edit_voicemail_via_restapi(step, extension):
    parameters = _extract_voicemail_info_to_restapi(step.hashes[0])
    number, context = func.extract_number_and_context_from_extension(extension)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(number, context)
    world.response = voicemail_action_restapi.edit_voicemail(voicemail_id, parameters)
Esempio n. 7
0
def when_i_send_a_request_for_the_voicemail_with_number_group1_using_its_id(step, extension):
    number, context = func.extract_number_and_context_from_extension(extension)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(number, context)
    world.response = voicemail_action_restapi.get_voicemail(voicemail_id)
Esempio n. 8
0
def when_i_delete_voicemail_with_number_group1_via_restapi(step, extension):
    number, context = func.extract_number_and_context_from_extension(extension)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(
        number, context)
    world.response = voicemail_action_restapi.delete_voicemail(voicemail_id)
Esempio n. 9
0
def when_i_send_a_request_for_the_voicemail_with_number_group1_using_its_id(
        step, extension):
    number, context = func.extract_number_and_context_from_extension(extension)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(
        number, context)
    world.response = voicemail_action_restapi.get_voicemail(voicemail_id)
Esempio n. 10
0
def _new_voicemail_destination(number_context):
    number, _, context = number_context.partition('@')
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(
        number, context)
    return VoicemailDestination(voicemail_id)
Esempio n. 11
0
def when_i_associate_a_fake_user_with_with_voicemail_group1_via_confd(step, voicemail):
    number, context = func.extract_number_and_context_from_extension(voicemail)
    voicemail_id = voicemail_helper.find_voicemail_id_with_number(number, context)

    world.response = voicemail_link_action_confd.link_voicemail(FAKE_ID, voicemail_id)