[Python-modules-team] Bug#912069: flask-wtf FTBFS: FAIL: test_i18n_enabled (tests.test_i18n.TestI18NCase)

Christoph Berg myon at debian.org
Wed Oct 31 21:22:18 GMT 2018


Re: Adrian Bunk 2018-10-27 <154067546369.20678.16027981767936779592.reportbug at localhost>
> Some recent change in unstable makes flask-wtf FTBFS:
> Traceback (most recent call last):
>   File "/build/1st/flask-wtf-0.14.2/.pybuild/cpython2_2.7_flaskext.wtf/build/tests/test_i18n.py", line 32, in test_i18n_enabled
>     assert '\u8be5\u5b57\u6bb5\u662f' in to_unicode(response.data)

I recently updated wtforms which is probably the culprit here. The
unicode string it is looking for is "该字段是" which is the
translation of "This field is required." (see tests/test_i18n.py).
The string is still in wtforms' wtforms/locale/zh/LC_MESSAGES/wtforms.po
file, though.

It looks like translations are busted:

        foo = response.data
        print (foo)
        assert '\u8be5\u5b57\u6bb5\u662f' in to_unicode(foo)

AssertionError:
-------------------- >> begin captured stdout << ---------------------

<!DOCTYPE html>

<html>
    <body>


        {'name': [u'This field is required.']}
        <form method="POST" enctype="multipart/form-data">

            <p>
                <label for="name">Name</label>
                <input id="name" name="name" required type="text" value="">
            </p>
            <p>
                <input id="submit" name="submit" type="submit" value="Submit">
            </p>
        </form>
    </body>
</html>

--------------------- >> end captured stdout << ----------------------

Christoph



More information about the Python-modules-team mailing list