#NEWLINE# def test_network_delete( self ) : #NEWLINE# #INDENT# mock_net = mock . Mock ( ) #NEWLINE# mock_net . physical_network = None #NEWLINE# self . lb_rpc . network_map = { #NEWLINE# #INDENT# NETWORK_ID : mock_net , #NEWLINE# #UNINDENT# } #NEWLINE# with mock . patch . object ( self . lb_rpc . agent . mgr , 'get_bridge_name' ) as get_br_fn , mock . patch . object ( self . lb_rpc . agent . mgr , 'delete_bridge' ) as del_fn : #NEWLINE# #INDENT# get_br_fn . return_value = 'br0' #NEWLINE# self . lb_rpc . network_delete ( 'anycontext' , network_id = NETWORK_ID ) #NEWLINE# get_br_fn . assert_called_with ( NETWORK_ID ) #NEWLINE# del_fn . assert_called_with ( 'br0' )