diff --git a/pokedex/tests/test_schema.py b/pokedex/tests/test_schema.py index 0a17dc4..196c368 100644 --- a/pokedex/tests/test_schema.py +++ b/pokedex/tests/test_schema.py @@ -197,9 +197,11 @@ def test_texts(cls): pytest.fail("%s: description mentions English" % column) # If there's more than one text column in a translation table, # they have to be nullable, to support missing translations + # Exception: the 'name' column may be required, if none of the other + # columns make sense without it if hasattr(cls, 'local_language') and len(text_columns) > 1: for column in text_columns: - assert column.nullable + assert column.nullable or column.name == 'name' @parametrize('table', tables.mapped_classes) def test_identifiers_with_names(table):