<s> from novaclient import extension <EOL> from novaclient . tests . unit import utils <EOL> from novaclient . tests . unit . v2 . contrib import fakes <EOL> from novaclient . v2 . contrib import tenant_networks <EOL> class TenantNetworkExtensionTests ( utils . TestCase ) : <EOL> def setUp ( self ) : <EOL> super ( TenantNetworkExtensionTests , self ) . setUp ( ) <EOL> extensions = [ <EOL> extension . Extension ( tenant_networks . __name__ . split ( "<STR_LIT:.>" ) [ - <NUM_LIT:1> ] , <EOL> tenant_networks ) , <EOL> ] <EOL> self . cs = fakes . FakeClient ( extensions = extensions ) <EOL> def test_list_tenant_networks ( self ) : <EOL> nets = self . cs . tenant_networks . list ( ) <EOL> self . assert_request_id ( nets , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . cs . assert_called ( '<STR_LIT:GET>' , '<STR_LIT>' ) <EOL> self . assertTrue ( len ( nets ) > <NUM_LIT:0> ) <EOL> def test_get_tenant_network ( self ) : <EOL> net = self . cs . tenant_networks . get ( <NUM_LIT:1> ) <EOL> self . assert_request_id ( net , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . cs . assert_called ( '<STR_LIT:GET>' , '<STR_LIT>' ) <EOL> def test_create_tenant_networks ( self ) : <EOL> net = self . cs . tenant_networks . create ( label = "<STR_LIT>" , <EOL> cidr = "<STR_LIT>" ) <EOL> self . assert_request_id ( net , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . cs . assert_called ( '<STR_LIT:POST>' , '<STR_LIT>' ) <EOL> def test_delete_tenant_networks ( self ) : <EOL> ret = self . cs . tenant_networks . delete ( <NUM_LIT:1> ) <EOL> self . assert_request_id ( ret , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . cs . assert_called ( '<STR_LIT>' , '<STR_LIT>' ) </s>
