#NEWLINE# def test__notify_l3_agent_new_port_action( self ) : #NEWLINE# #INDENT# kwargs = { #NEWLINE# #INDENT# 'context' : self . adminContext , #NEWLINE# 'original_port' : None , #NEWLINE# 'port' : { #NEWLINE# #INDENT# 'device_owner' : DEVICE_OWNER_COMPUTE , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# l3plugin = mock . Mock ( ) #NEWLINE# with mock . patch . object ( manager . NeutronManager , 'get_service_plugins' , return_value = { #NEWLINE# #INDENT# 'L3_ROUTER_NAT' : l3plugin , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# l3_dvrscheduler_db . _notify_l3_agent_new_port ( 'port' , 'after_create' , mock . ANY , ** kwargs ) #NEWLINE# l3plugin . update_arp_entry_for_dvr_service_port . assert_called_once_with ( self . adminContext , kwargs . get ( 'port' ) ) #NEWLINE# l3plugin . dvr_handle_new_service_port . assert_called_once_with ( self . adminContext , kwargs . get ( 'port' ) )