'Test exception handling when snapshot quota reserve failed.'

@mock.patch.object(QUOTAS, 'reserve', side_effect=OVER_SNAPSHOT_QUOTA_EXCEPTION)
def test_create_snapshots_in_db_failed_quota_reserve(self, mock_reserve):

    test_volume = tests_utils.create_volume(self.context, status='available', host=CONF.host)
    volume_api = cinder.volume.api.API()
    self.assertRaises(exception.SnapshotLimitExceeded, volume_api.create_snapshots_in_db, self.context, [test_volume], 'fake_name', 'fake_description', fake.CONSISTENCY_GROUP_ID)
