From 2082f841c8c4eef7ff7959627baa2449f7d63007 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 12 Apr 2011 08:57:30 +0300 Subject: [PATCH] Mark MoveEffect.effect as a Markdown column. Also relax the appropriate test --- pokedex/db/tables.py | 2 +- pokedex/tests/test_schema.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index f921e90..fcb1c1b 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -805,7 +805,7 @@ create_translation_table('move_effect_prose', MoveEffect, 'prose', short_effect = Column(Unicode(256), nullable=True, info=dict(description="A short summary of the effect", format='plaintext')), effect = Column(Unicode(5120), nullable=True, - info=dict(description="A detailed description of the effect", format='plaintext')), + info=dict(description="A detailed description of the effect", format='markdown')), ) class MoveEffectChangelog(TableBase): diff --git a/pokedex/tests/test_schema.py b/pokedex/tests/test_schema.py index 0c0dade..eb536ec 100644 --- a/pokedex/tests/test_schema.py +++ b/pokedex/tests/test_schema.py @@ -181,7 +181,8 @@ def test_texts(): if format not in good_formats: raise AssertionError(assert_text % column) is_markdown = isinstance(column.type, markdown.MarkdownColumn) - if is_markdown != (format == 'markdown'): + if is_markdown and (format != 'markdown'): + # Note: regular string with markdown syntax is allowed raise AssertionError('%s: markdown format/column type mismatch' % column) if (format != 'identifier') and (column.name == 'identifier'): raise AssertionError('%s: identifier column name/type mismatch' % column) -- 2.7.4