#NEWLINE# def test_bagpipe_callback_to_rpc_update_down2active( self ) : #NEWLINE# #INDENT# with self . port ( arg_list = ( portbindings . HOST_ID , ) , ** { #NEWLINE# #INDENT# portbindings . HOST_ID : TESTHOST , #NEWLINE# #UNINDENT# } ) as port : #NEWLINE# #INDENT# self . _update_port_status ( port , PORT_STATUS_ACTIVE ) #NEWLINE# self . bagpipe_driver . registry_port_updated ( None , None , None , context = self . ctxt , port = port [ 'port' ] , original_port = { #NEWLINE# #INDENT# 'status' : PORT_STATUS_DOWN , #NEWLINE# 'device_owner' : 'foo' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . mock_attach_rpc . assert_called_once_with ( mock . ANY , self . _build_expected_return_active ( self [ 'port' ] ) , TESTHOST ) #NEWLINE# self . assertFalse ( self . mock_detach_rpc . called )