resources = {}
deltas = {}
for i, resource in enumerate(('volumes', 'gigabytes')):
- quotas[resource] = db.quota_create(context, project_id,
- resource, i + 1)
+ quota_obj = db.quota_create(context, project_id, resource, i + 1)
+ quotas[resource] = quota_obj.hard_limit
resources[resource] = quota.ReservableResource(resource,
'_sync_%s' % resource)
deltas[resource] = i + 1
def _dict_from_object(self, obj, ignored_keys):
if ignored_keys is None:
ignored_keys = []
- return {k: v for k, v in obj.iteritems()
+ if isinstance(obj, dict):
+ items = obj.items()
+ else:
+ items = obj.iteritems()
+ return {k: v for k, v in items
if k not in ignored_keys}
def _assertEqualObjects(self, obj1, obj2, ignored_keys=None):
cinder.tests.unit.test_conf \
cinder.tests.unit.test_context \
cinder.tests.unit.test_create_volume_flow \
+ cinder.tests.unit.test_db_api \
cinder.tests.unit.test_dellfc \
cinder.tests.unit.test_dellsc \
cinder.tests.unit.test_dellscapi \
cinder.tests.unit.test_nimble \
cinder.tests.unit.test_openvstorage \
cinder.tests.unit.test_qos_specs \
+ cinder.tests.unit.test_quota \
cinder.tests.unit.test_rbd \
cinder.tests.unit.test_remotefs \
cinder.tests.unit.test_replication \