Issue #28 resolved

Unicode doctest problem with layered types values in modeltests.lookup

Johan Harjono
created an issue



File "/home/johan/workspace/fiji/build/tests/modeltests/lookup/", line ?, in modeltests.lookup.models.test.API_TESTS Failed example: Article.objects.values('headline') Expected: [{'headline': u'Article 5'}, {'headline': u'Article 6'}, {'headline': u'Article 4'}, {'headline': u'Article 2'}, {'headline': u'Article 3'}, {'headline': u'Article 7'}, {'headline': u'Article 1'}] Got: [{'headline': 'Article 5'}, {'headline': 'Article 6'}, {'headline': 'Article 4'}, {'headline': 'Article 2'}, {'headline': 'Article 3'}, {'headline': 'Article 7'}, {'headline': 'Article 1'}] }}}

Comments (2)

  1. Johan Harjono reporter

    Resolved with changeset 9a5a6051ecd1 per Martin's advice:

    1. collect the repr output in a variable
    2. strip b"" and u"" prefixes both from the expected output, and from the rerpr
    3. then let these match

    some concerns about possible false positives, and better way for stripping prefixes though

  2. Log in to comment