def _switchboard_has_current_call():
    current_call = cti_helper.get_switchboard_current_call_infos()
    return current_call['caller_id'] != ""
def then_the_switchboard_is_talking_to_1_number_2(step, cid_name, cid_num):
    common.wait_until(_switchboard_has_current_call, tries=10)
    current_call = cti_helper.get_switchboard_current_call_infos()
    assert_that(current_call['caller_id'], equal_to("%s <%s>" % (cid_name, cid_num)))
 def _switchboard_has_current_call(cid_name, cid_num):
     current_call = cti_helper.get_switchboard_current_call_infos()
     assert_that(current_call['caller_id'], equal_to("%s <%s>" % (cid_name, cid_num)))
def then_the_switchboard_1_is_not_talking_to_anyone(step, switchboard):
    current_call = cti_helper.get_switchboard_current_call_infos()
    assert_that(current_call['caller_id'], equal_to(""))
    phone = step.scenario.phone_register.get_user_phone(switchboard)
    phone.is_hungup()
 def assert_switchboard_is_empty():
     current_call = cti_helper.get_switchboard_current_call_infos()
     assert_that(current_call['caller_id'], equal_to(""))