def telecom_contacts_test(): controller = RemoteController("N0AA003759K70700223") telecom = controller.get_telecom_adapter() for item in telecom.get_contacts(): print(item)
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)
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')
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')
def ussd_request_test(): controller = RemoteController("N0AA003759K70700223") telecom = controller.get_telecom_adapter() telecom.send_ussd_request("*161#")