#NEWLINE# def test_send_command_expect( ) : #NEWLINE# #INDENT# '\n    Verify send_command_expect() method with default parameters works properly\n    Verify send_command_expect() method with a different expect string\n    Verify send_command_expect() with additional delay works properly\n    Verify send_command_expect() with less delay works properly\n    Verify send_command_expect() with lower max_loops works properly\n    ' #NEWLINE# basic_command = commands . get ( 'basic' ) #NEWLINE# cmd_expect_std = net_connect . send_command_expect ( basic_command ) #NEWLINE# cmd_expect_short = net_connect . send_command_expect ( basic_command , expect_string = commands . get ( 'interface_name' ) ) #NEWLINE# cmd_expect_slow = net_connect . send_command_expect ( basic_command , delay_factor = 2 ) #NEWLINE# cmd_expect_fast = net_connect . send_command_expect ( basic_command , delay_factor = 0.25 ) #NEWLINE# cmd_expect_max_loops = net_connect . send_command_expect ( basic_command , max_loops = 10 ) #NEWLINE# expect_strip_prompt_true = cmd_expect_std #NEWLINE# expect_strip_prompt_false = net_connect . send_command_expect ( basic_command , strip_prompt = False ) #NEWLINE# expect_strip_command_true = cmd_expect_std #NEWLINE# expect_strip_command_false = net_connect . send_command_expect ( basic_command , strip_command = False ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in cmd_expect_std ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in expect_strip_command_false ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in cmd_expect_fast ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'interface_ip' ] in cmd_expect_max_loops ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'base_prompt' ] not in expect_strip_prompt_true ) #NEWLINE# assert ( EXPECTED_RESPONSES [ 'base_prompt' ] in expect_strip_prompt_false ) #NEWLINE# assert ( basic_command not in expect_strip_command_true ) #NEWLINE# assert ( basic_command in expect_strip_command_false )