示例#1
0
def telecom_contacts_test():
    controller = RemoteController("N0AA003759K70700223")

    telecom = controller.get_telecom_adapter()

    for item in telecom.get_contacts():
        print(item)
示例#2
0
def telecom_call_history_test():
    controller = RemoteController("N0AA003759K70700223")

    telecom = controller.get_telecom_adapter()

    telecom.get_call_state()

    for item in telecom.get_call_history():
        print(item)
示例#3
0
def answer_incoming_call():
    controller = RemoteController("N0AA003759K70700223")

    telecom = controller.get_telecom_adapter()

    # TODO call to your test phone )

    wait(condition=lambda: telecom.get_call_state() == CallState.INCOMING_CALL,
         max_timeout=45,
         waiting_for='incoming call',
         error_msg='nobody calling)')

    telecom.answer_incoming_call()

    time.sleep(5)

    telecom.end_call()

    wait(condition=lambda: telecom.get_call_state() == CallState.NONE,
         max_timeout=15,
         waiting_for='not in call',
         error_msg='in call')
示例#4
0
def call_state_test():
    controller = RemoteController("N0AA003759K70700223")

    telecom = controller.get_telecom_adapter()

    telecom.get_call_state()

    telecom.call("466")

    wait(condition=lambda: telecom.get_call_state() == CallState.IN_CALL,
         max_timeout=15,
         waiting_for='in call',
         error_msg='not in call')

    time.sleep(5)

    telecom.get_call_state()

    telecom.end_call()

    wait(condition=lambda: telecom.get_call_state() == CallState.NONE,
         max_timeout=15,
         waiting_for='not in call',
         error_msg='in call')
示例#5
0
def ussd_request_test():
    controller = RemoteController("N0AA003759K70700223")

    telecom = controller.get_telecom_adapter()

    telecom.send_ussd_request("*161#")