Skip to content
Snippets Groups Projects
Unverified Commit ab345541 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Just unit test this instead

parent c08746c7
No related branches found
No related tags found
1 merge request!116Record redemption public keys
......@@ -132,9 +132,3 @@ _UPGRADES = {
""",
],
}
def _check_consistency():
if _UPGRADES.keys() != range(len(_UPGRADES)):
raise TypeError("Inconsistent schema versions in schema upgraders.")
_check_consistency()
# coding: utf-8
# Copyright 2019 PrivateStorage.io, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Tests for ``_zkapauthorizer.schema``.
"""
from __future__ import (
absolute_import,
)
from testtools import (
TestCase,
)
from testtools.matchers import (
Equals,
)
from ..schema import (
_UPGRADES,
)
class UpgradeTests(TestCase):
def test_consistency(self):
"""
Upgrades are defined for every version up to the latest version.
"""
self.assertThat(
list(_UPGRADES.keys()),
Equals(list(range(len(_UPGRADES)))),
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment