<s> import pytest <EOL> from netmiko import ConnectHandler <EOL> from DEVICE_CREDS import * <EOL> def setup_module ( module ) : <EOL> module . EXPECTED_RESPONSES = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> show_ver_command = '<STR_LIT>' <EOL> module . basic_command = '<STR_LIT>' <EOL> net_connect = ConnectHandler ( ** cisco_xe ) <EOL> module . show_version = net_connect . send_command ( show_ver_command ) <EOL> module . show_ip = net_connect . send_command ( module . basic_command ) <EOL> module . base_prompt = net_connect . base_prompt <EOL> def test_disable_paging ( ) : <EOL> '''<STR_LIT>''' <EOL> assert '<STR_LIT>' in show_version <EOL> def test_verify_ssh_connect ( ) : <EOL> '''<STR_LIT>''' <EOL> assert '<STR_LIT>' in show_version <EOL> def test_verify_send_command ( ) : <EOL> '''<STR_LIT>''' <EOL> assert EXPECTED_RESPONSES [ '<STR_LIT>' ] in show_ip <EOL> def test_base_prompt ( ) : <EOL> '''<STR_LIT>''' <EOL> assert base_prompt == EXPECTED_RESPONSES [ '<STR_LIT>' ] <EOL> def test_strip_prompt ( ) : <EOL> '''<STR_LIT>''' <EOL> assert EXPECTED_RESPONSES [ '<STR_LIT>' ] not in show_ip <EOL> def test_strip_command ( ) : <EOL> '''<STR_LIT>''' <EOL> assert basic_command not in show_ip <EOL> def test_normalize_linefeeds ( ) : <EOL> '''<STR_LIT>''' <EOL> assert not '<STR_LIT:\r\n>' in show_version </s>
