From: Petr Viktorin Date: Tue, 12 Apr 2011 05:57:30 +0000 (+0300) Subject: Mark MoveEffect.effect as a Markdown column. X-Git-Tag: veekun-promotions/2011041501~1^2~3 X-Git-Url: http://git.veekun.com/zzz-pokedex.git/commitdiff_plain/2082f841c8c4eef7ff7959627baa2449f7d63007?ds=inline Mark MoveEffect.effect as a Markdown column. Also relax the appropriate test --- 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)