<s> from neutron . common import constants <EOL> from neutron . db import db_base_plugin_v2 <EOL> from neutron . db import netmtu_db <EOL> from neutron . extensions import netmtu <EOL> from neutron . tests . unit . db import test_db_base_plugin_v2 <EOL> class NetmtuExtensionManager ( object ) : <EOL> def get_resources ( self ) : <EOL> return [ ] <EOL> def get_actions ( self ) : <EOL> return [ ] <EOL> def get_request_extensions ( self ) : <EOL> return [ ] <EOL> def get_extended_resources ( self , version ) : <EOL> return netmtu . get_extended_resources ( version ) <EOL> class NetmtuExtensionTestPlugin ( db_base_plugin_v2 . NeutronDbPluginV2 , <EOL> netmtu_db . Netmtu_db_mixin ) : <EOL> """<STR_LIT>""" <EOL> supported_extension_aliases = [ "<STR_LIT>" ] <EOL> class NetmtuExtensionTestCase ( test_db_base_plugin_v2 . TestNetworksV2 ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> plugin = ( '<STR_LIT>' + <EOL> '<STR_LIT>' ) <EOL> ext_mgr = NetmtuExtensionManager ( ) <EOL> super ( NetmtuExtensionTestCase , self ) . setUp ( plugin = plugin , <EOL> ext_mgr = ext_mgr ) <EOL> def test_list_networks_with_fields_mtu ( self ) : <EOL> with self . network ( name = '<STR_LIT>' ) as net1 : <EOL> req = self . new_list_request ( '<STR_LIT>' , <EOL> params = '<STR_LIT>' ) <EOL> res = self . deserialize ( self . fmt , req . get_response ( self . api ) ) <EOL> self . assertEqual ( <NUM_LIT:1> , len ( res [ '<STR_LIT>' ] ) ) <EOL> self . assertEqual ( res [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:name>' ] , <EOL> net1 [ '<STR_LIT>' ] [ '<STR_LIT:name>' ] ) <EOL> self . assertEqual ( constants . DEFAULT_NETWORK_MTU , <EOL> res [ '<STR_LIT>' ] [ <NUM_LIT:0> ] . get ( '<STR_LIT>' ) ) <EOL> def test_show_network_mtu ( self ) : <EOL> with self . network ( name = '<STR_LIT>' ) as net : <EOL> req = self . new_show_request ( '<STR_LIT>' , net [ '<STR_LIT>' ] [ '<STR_LIT:id>' ] ) <EOL> res = self . deserialize ( self . fmt , req . get_response ( self . api ) ) <EOL> self . assertEqual ( res [ '<STR_LIT>' ] [ '<STR_LIT:name>' ] , <EOL> net [ '<STR_LIT>' ] [ '<STR_LIT:name>' ] ) <EOL> self . assertEqual ( constants . DEFAULT_NETWORK_MTU , <EOL> res [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) </s>
