'Tests updating a fake quota class. The way this works in the API
is that if the quota class is not found, it is created. So in this
test we can use a fake quota class with fake values and they will all
get set. We don\'t use the default quota class because it is global
and we don\'t want to interfere with other tests.'

def test_quota_class_update(self):

    class_name = self._get_quota_class_name()
    params = [class_name]
    expected_values = {}
    for quota_name in (self._included_resources + self._extra_update_resources):
        params.append(('--%s    99' % quota_name.replace('_', '-')))
        expected_values[quota_name] = '99'
    self.nova('quota-class-update', params='    '.join(params))
    output = self.nova(('quota-class-show    %s' % class_name))
    self._verify_qouta_class_show_output(output, expected_values)
    for quota_name in self._blocked_update_resources:
        self.assertRaises(exceptions.CommandFailed, self.nova, ('quota-class-update    %s    --%s    99' % (class_name, quota_name.replace('_', '-'))))
