<s> from novaclient . tests . unit . fixture_data import client <EOL> from novaclient . tests . unit . fixture_data import quotas as data <EOL> from novaclient . tests . unit import utils <EOL> from novaclient . tests . unit . v2 import fakes <EOL> class QuotaSetsTest ( utils . FixturedTestCase ) : <EOL> client_fixture_class = client . V1 <EOL> data_fixture_class = data . V1 <EOL> def test_tenant_quotas_get ( self ) : <EOL> tenant_id = '<STR_LIT:test>' <EOL> q = self . cs . quotas . get ( tenant_id ) <EOL> self . assert_request_id ( q , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . assert_called ( '<STR_LIT:GET>' , '<STR_LIT>' % tenant_id ) <EOL> def test_user_quotas_get ( self ) : <EOL> tenant_id = '<STR_LIT:test>' <EOL> user_id = '<STR_LIT>' <EOL> q = self . cs . quotas . get ( tenant_id , user_id = user_id ) <EOL> self . assert_request_id ( q , fakes . FAKE_REQUEST_ID_LIST ) <EOL> url = '<STR_LIT>' % ( tenant_id , user_id ) <EOL> self . assert_called ( '<STR_LIT:GET>' , url ) <EOL> def test_tenant_quotas_defaults ( self ) : <EOL> tenant_id = '<STR_LIT>' <EOL> q = self . cs . quotas . defaults ( tenant_id ) <EOL> self . assert_request_id ( q , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . assert_called ( '<STR_LIT:GET>' , '<STR_LIT>' % tenant_id ) <EOL> def test_force_update_quota ( self ) : <EOL> q = self . cs . quotas . get ( '<STR_LIT>' ) <EOL> qu = q . update ( cores = <NUM_LIT:2> , force = True ) <EOL> self . assert_request_id ( qu , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . assert_called ( <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> { '<STR_LIT>' : { '<STR_LIT>' : True , '<STR_LIT>' : <NUM_LIT:2> } } ) <EOL> def test_quotas_delete ( self ) : <EOL> tenant_id = '<STR_LIT:test>' <EOL> ret = self . cs . quotas . delete ( tenant_id ) <EOL> self . assert_request_id ( ret , fakes . FAKE_REQUEST_ID_LIST ) <EOL> self . assert_called ( '<STR_LIT>' , '<STR_LIT>' % tenant_id ) <EOL> def test_user_quotas_delete ( self ) : <EOL> tenant_id = '<STR_LIT:test>' <EOL> user_id = '<STR_LIT>' <EOL> ret = self . cs . quotas . delete ( tenant_id , user_id = user_id ) <EOL> self . assert_request_id ( ret , fakes . FAKE_REQUEST_ID_LIST ) <EOL> url = '<STR_LIT>' % ( tenant_id , user_id ) <EOL> self . assert_called ( '<STR_LIT>' , url ) </s>
