<s> import mock <EOL> from neutron . tests . unit . extensions import base as test_extensions_base <EOL> from neutronclient . v2_0 import client <EOL> BGPVPN_ID = "<STR_LIT>" <EOL> NET_ASSOC_ID = "<STR_LIT>" <EOL> ASSOCS_PATH = "<STR_LIT>" % BGPVPN_ID <EOL> ASSOC_PATH = "<STR_LIT>" % BGPVPN_ID <EOL> class BgpvpnClientTestCase ( test_extensions_base . ExtensionTestCase ) : <EOL> def setUp ( self ) : <EOL> super ( BgpvpnClientTestCase , self ) . setUp ( ) <EOL> self . client = client . Client ( ) <EOL> self . client . list_ext = mock . Mock ( ) <EOL> self . client . create_ext = mock . Mock ( ) <EOL> self . client . show_ext = mock . Mock ( ) <EOL> self . client . update_ext = mock . Mock ( ) <EOL> self . client . delete_ext = mock . Mock ( ) <EOL> def test_api_url_list ( self ) : <EOL> self . client . list_network_associations ( BGPVPN_ID ) <EOL> self . client . list_ext . assert_called_once_with ( mock . ANY , ASSOCS_PATH , <EOL> mock . ANY ) <EOL> def test_api_url_create ( self ) : <EOL> self . client . create_network_association ( BGPVPN_ID , { } ) <EOL> self . client . create_ext . assert_called_once_with ( ASSOCS_PATH , mock . ANY ) <EOL> def test_api_url_show ( self ) : <EOL> self . client . show_network_association ( NET_ASSOC_ID , BGPVPN_ID ) <EOL> self . client . show_ext . assert_called_once_with ( ASSOC_PATH , <EOL> NET_ASSOC_ID ) <EOL> def test_api_url_update ( self ) : <EOL> self . client . update_network_association ( NET_ASSOC_ID , BGPVPN_ID , { } ) <EOL> self . client . update_ext . assert_called_once_with ( ASSOC_PATH , <EOL> NET_ASSOC_ID , <EOL> mock . ANY ) <EOL> def test_api_url_delete ( self ) : <EOL> self . client . delete_network_association ( NET_ASSOC_ID , BGPVPN_ID ) <EOL> self . client . delete_ext . assert_called_once_with ( ASSOC_PATH , <EOL> NET_ASSOC_ID ) </s>
