def test_unix_remote_proxy_pc_device_multiple_prompts( device_connection, unix_remote_proxy_pc_output): unix_remote_proxy_pc_changed_output = copy_dict( unix_remote_proxy_pc_output, deep_copy=True) combined_line = "moler_bash#" for src_state in unix_remote_proxy_pc_output.keys(): for cmd_string in unix_remote_proxy_pc_output[src_state].keys(): combined_line = "{} {}".format( combined_line, unix_remote_proxy_pc_output[src_state][cmd_string]) for src_state in unix_remote_proxy_pc_changed_output.keys(): for cmd_string in unix_remote_proxy_pc_changed_output[src_state].keys( ): unix_remote_proxy_pc_changed_output[src_state][ cmd_string] = combined_line unix_remote_proxy_pc = get_device( name="UNIX_REMOTE_PROXY_PC", connection=device_connection, device_output=unix_remote_proxy_pc_changed_output, test_file_path=__file__) assert unix_remote_proxy_pc._check_all_prompts_on_line is True assert unix_remote_proxy_pc._prompts_event.check_against_all_prompts is True with pytest.raises(MolerException) as exception: iterate_over_device_states(device=unix_remote_proxy_pc, max_no_of_threads=0) assert "More than 1 prompt match the same line" in str(exception.value)
def test_unix_remote_device(device_connection, unix_remote_output): unix_remote = get_device(name="UNIX_REMOTE", connection=device_connection, device_output=unix_remote_output, test_file_path=__file__) iterate_over_device_states(device=unix_remote)
def test_at_remote_device(device_connection, at_remote_output): at_remote = get_device(name="AT_REMOTE", connection=device_connection, device_output=at_remote_output, test_file_path=__file__) iterate_over_device_states(device=at_remote)
def test_juniper_ex_proxy_pc_device(device_connection, juniper_ex_proxy_pc_output): juniper_ex_proxy_pc = get_device(name="JUNIPER_EX_PROXY_PC", connection=device_connection, device_output=juniper_ex_proxy_pc_output, test_file_path=__file__) iterate_over_device_states(device=juniper_ex_proxy_pc)
def test_unix_local_device(device_connection, unix_local_output): unix_local = get_device(name="UNIX_LOCAL", connection=device_connection, device_output=unix_local_output, test_file_path=__file__) iterate_over_device_states(device=unix_local)
def test_unix_remote_device(device_connection, unix_remote_output): unix_remote = get_device(name="UNIX_REMOTE", connection=device_connection, device_output=unix_remote_output, test_file_path=__file__) iterate_over_device_states(device=unix_remote) assert None is not unix_remote._cmdnames_available_in_state[ 'UNIX_LOCAL_ROOT']
def test_unix_remote_proxy_pc_device(device_connection, unix_remote_proxy_pc_output): unix_remote_proxy_pc = get_device( name="UNIX_REMOTE_PROXY_PC", connection=device_connection, device_output=unix_remote_proxy_pc_output, test_file_path=__file__) iterate_over_device_states(device=unix_remote_proxy_pc)
def test_unix_remote_proxy_pc_device(device_connection, unix_remote_proxy_pc_output): unix_remote_proxy_pc = get_device( name="UNIX_REMOTE_PROXY_PC", connection=device_connection, device_output=unix_remote_proxy_pc_output, test_file_path=__file__) assert None is unix_remote_proxy_pc._cmdnames_available_in_state[ 'UNIX_LOCAL_ROOT'] iterate_over_device_states(device=unix_remote_proxy_pc) assert None is not unix_remote_proxy_pc._cmdnames_available_in_state[ 'UNIX_LOCAL_ROOT']
def test_pdu_device(device_connection, pdu_output): pdu = get_device(name="PDU", connection=device_connection, device_output=pdu_output, test_file_path=__file__) iterate_over_device_states(device=pdu)
def test_scpi_device(device_connection, scpi_output): scpi = get_device(name="SCPI", connection=device_connection, device_output=scpi_output, test_file_path=__file__) iterate_over_device_states(device=scpi)
def test_scpi_proxy_pc_device(device_connection, scpi_proxy_pc_output): scpi_proxy_pc = get_device(name="SCPI_PROXY_PC", connection=device_connection, device_output=scpi_proxy_pc_output, test_file_path=__file__) iterate_over_device_states(device=scpi_proxy_pc)
def test_juniper_ex_device(device_connection, juniper_ex_output): juniper_ex = get_device(name="JUNIPER_EX", connection=device_connection, device_output=juniper_ex_output, test_file_path=__file__) iterate_over_device_states(device=juniper_ex)