<s> from novaclient . tests . functional import base <EOL> class TestQuotasNovaClient ( base . ClientTestBase ) : <EOL> """<STR_LIT>""" <EOL> COMPUTE_API_VERSION = "<STR_LIT>" <EOL> _quota_resources = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' ] <EOL> def test_quotas_update ( self ) : <EOL> tenant_id = self . _get_project_id ( self . cli_clients . tenant_name ) <EOL> self . addCleanup ( self . client . quotas . delete , tenant_id ) <EOL> original_quotas = self . client . quotas . get ( tenant_id ) <EOL> difference = <NUM_LIT:10> <EOL> params = [ tenant_id ] <EOL> for quota_name in self . _quota_resources : <EOL> params . append ( "<STR_LIT>" % { <EOL> "<STR_LIT:name>" : quota_name . replace ( "<STR_LIT:_>" , "<STR_LIT:->" ) , <EOL> "<STR_LIT:value>" : getattr ( original_quotas , quota_name ) + difference } ) <EOL> self . nova ( "<STR_LIT>" , params = "<STR_LIT:U+0020>" . join ( params ) ) <EOL> updated_quotas = self . client . quotas . get ( tenant_id ) <EOL> for quota_name in self . _quota_resources : <EOL> self . assertEqual ( getattr ( original_quotas , quota_name ) , <EOL> getattr ( updated_quotas , quota_name ) - difference ) </s>
