parameters: (remote_console_instance, command_to_run, expected_log_line, timeout=60)
docstring: This is just a helper function to help send a command and validate against expected output.
      :param remote_console_instance: RemoteConsole instance
      :param command_to_run: The command that you wish to run
      :param expected_log_line:  The console log line to expect in order to set the event to true
      :param timeout: int representing the time to wait in seconds
      :return: None, but will assert against the expected_response() boolean return for validation.
docstring_summary: This is just a helper function to help send a command and validate against expected output.
      :param remote_console_instance: RemoteConsole instance
      :param command_to_run: The command that you wish to run
      :param expected_log_line:  The console log line to expect in order to set the event to true
      :param timeout: int representing the time to wait in seconds
      :return: None, but will assert against the expected_response() boolean return for validation.
docstring_tokens: This is just a helper function to help send a command and validate against expected output . : param remote_console_instance : RemoteConsole instance : param command_to_run : The command that you wish to run : param expected_log_line : The console log line to expect in order to set the event to true : param timeout : int representing the time to wait in seconds : return : None but will assert against the expected_response () boolean return for validation .
function: def send_command_and_expect_response(remote_console_instance, command_to_run, expected_log_line, timeout=60):
      # type: (RemoteConsole, str, str, int) -> None
      """
      This is just a helper function to help send a command and validate against expected output.
      :param remote_console_instance: RemoteConsole instance
      :param command_to_run: The command that you wish to run
      :param expected_log_line:  The console log line to expect in order to set the event to true
      :param timeout: int representing the time to wait in seconds
      :return: None, but will assert against the expected_response() boolean return for validation.
      """
      event = threading.Event()
      remote_console_instance.handlers[expected_log_line.encode()] = event
  
      def expected_response():
          return remote_console_instance.expect_log_line(expected_log_line, timeout)
  
      remote_console_instance.send_command(command_to_run)
  
      assert expected_response(), \
          '{} command failed. Was looking for {} in the log but did not find it.'.format(
              command_to_run, expected_log_line)
function_tokens: def send_command_and_expect_response ( remote_console_instance , command_to_run , expected_log_line , timeout = 60 ) : # type: (RemoteConsole, str, str, int) -> None event = threading . Event ( ) remote_console_instance . handlers [ expected_log_line . encode ( ) ] = event def expected_response ( ) : return remote_console_instance . expect_log_line ( expected_log_line , timeout ) remote_console_instance . send_command ( command_to_run ) assert expected_response ( ) , '{} command failed. Was looking for {} in the log but did not find it.' . format ( command_to_run , expected_log_line )