#NEWLINE# def test_send_command( ) : #NEWLINE# #INDENT# '\n    Verify send_command() method with default parameters works properly\n    Verify send_command() with additional delay works properly\n    Verify send_command() with less delay works properly\n    Verify send_command() with lower max_loops works properly\n    ' #NEWLINE# basic_command = commands . get ( 'basic' ) #NEWLINE# send_command_std = net_connect . send_command ( basic_command ) #NEWLINE# send_command_slow = net_connect . send_command ( basic_command , delay_factor = 2 ) #NEWLINE# send_command_fast = net_connect . send_command ( basic_command , delay_factor = 0.25 ) #NEWLINE# send_command_max_loops = net_connect . send_command ( basic_command , max_loops = 10 ) #NEWLINE# strip_prompt_true = send_command_std #NEWLINE# strip_prompt_false = net_connect . send_command ( basic_command , strip_prompt = False ) #NEWLINE# strip_command_true = send_command_std #NEWLINE# strip_command_false = net_connect . send_command ( basic_command , strip_command = False ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in send_command_std ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in send_command_slow ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in send_command_fast ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in send_command_max_loops ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'base_prompt' ] not in strip_prompt_true ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'base_prompt' ] in strip_prompt_false ) #NEWLINE# assert ( basic_command not in strip_command_true ) #NEWLINE# assert ( basic_command in strip_command_false )