<s> import unittest <EOL> from flexmock import flexmock_teardown <EOL> from tests . dell import enable , configuring_vlan , assert_running_config_contains_in_order , unconfigure_vlan , assert_interface_configuration , ssh_protocol_factory , telnet_protocol_factory <EOL> from tests . util . protocol_util import with_protocol <EOL> class DellConfigureVlanTest ( unittest . TestCase ) : <EOL> __test__ = False <EOL> protocol_factory = None <EOL> def setUp ( self ) : <EOL> self . protocol = self . protocol_factory ( ) <EOL> def tearDown ( self ) : <EOL> flexmock_teardown ( ) <EOL> @ with_protocol <EOL> def test_configuring_a_vlan ( self , t ) : <EOL> enable ( t ) <EOL> configuring_vlan ( t , <NUM_LIT> ) <EOL> assert_running_config_contains_in_order ( t , [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] ) <EOL> unconfigure_vlan ( t , <NUM_LIT> ) <EOL> assert_running_config_contains_in_order ( t , [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" <EOL> ] ) <EOL> @ with_protocol <EOL> def test_unconfiguring_a_vlan_failing ( self , t ) : <EOL> enable ( t ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> @ with_protocol <EOL> def test_configuring_a_vlan_name ( self , t ) : <EOL> enable ( t ) <EOL> configuring_vlan ( t , <NUM_LIT> ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT:name>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> t . write ( "<STR_LIT>" ) <EOL> t . readln ( "<STR_LIT>" ) <EOL> t . read ( "<STR_LIT>" ) <EOL> assert_interface_configuration ( t , "<STR_LIT>" , [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] ) <EOL> unconfigure_vlan ( t , <NUM_LIT> ) <EOL> class DellConfigureVlanSshTest ( DellConfigureVlanTest ) : <EOL> __test__ = True <EOL> protocol_factory = ssh_protocol_factory <EOL> class DellConfigureVlanTelnetTest ( DellConfigureVlanTest ) : <EOL> __test__ = True <EOL> protocol_factory = telnet_protocol_factory </s>
