'Test exception handling when snapshot quota commit failed.'

@mock.patch.object(QUOTAS, 'commit', side_effect=exception.QuotaError('Snapshot    quota    commit    failed!'))
def test_create_snapshot_failed_quota_commit(self, mock_snapshot):

    test_volume = tests_utils.create_volume(self.context, status='available', host=CONF.host)
    volume_api = cinder.volume.api.API()
    self.assertRaises(exception.QuotaError, volume_api.create_snapshot, self.context, test_volume, 'fake_name', 'fake_description')
