<s> import mock <EOL> from oslo_config import cfg <EOL> import testtools <EOL> from neutron . plugins . ml2 . drivers . linuxbridge . agent import linuxbridge_neutron_agent <EOL> from neutron . tests . functional . agent . linux import test_ip_lib <EOL> lba = linuxbridge_neutron_agent <EOL> class LinuxBridgeAgentTests ( test_ip_lib . IpLibTestFramework ) : <EOL> def setUp ( self ) : <EOL> super ( LinuxBridgeAgentTests , self ) . setUp ( ) <EOL> agent_rpc = ( '<STR_LIT>' ) <EOL> mock . patch ( agent_rpc ) . start ( ) <EOL> mock . patch ( '<STR_LIT>' ) . start ( ) <EOL> cfg . CONF . set_override ( '<STR_LIT>' , False , '<STR_LIT>' ) <EOL> def test_validate_interface_mappings ( self ) : <EOL> mappings = { '<STR_LIT>' : '<STR_LIT>' , '<STR_LIT>' : '<STR_LIT>' } <EOL> with testtools . ExpectedException ( SystemExit ) : <EOL> lba . LinuxBridgeManager ( { } , mappings ) <EOL> self . manage_device ( <EOL> self . generate_device_details ( ) . _replace ( namespace = None , <EOL> name = '<STR_LIT>' ) ) <EOL> with testtools . ExpectedException ( SystemExit ) : <EOL> lba . LinuxBridgeManager ( { } , mappings ) <EOL> self . manage_device ( <EOL> self . generate_device_details ( ) . _replace ( namespace = None , <EOL> name = '<STR_LIT>' ) ) <EOL> lba . LinuxBridgeManager ( { } , mappings ) <EOL> def test_validate_bridge_mappings ( self ) : <EOL> mappings = { '<STR_LIT>' : '<STR_LIT>' } <EOL> with testtools . ExpectedException ( SystemExit ) : <EOL> lba . LinuxBridgeManager ( mappings , { } ) <EOL> self . manage_device ( <EOL> self . generate_device_details ( ) . _replace ( namespace = None , <EOL> name = '<STR_LIT>' ) ) <EOL> lba . LinuxBridgeManager ( mappings , { } ) </s>
