mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Fix the util.order_by_name test, for real this time.
This commit is contained in:
parent
68b83c0ec1
commit
9a4683c0c1
1 changed files with 3 additions and 1 deletions
|
@ -38,7 +38,9 @@ def test_types_french_order(session):
|
||||||
types = session.query(tables.Type).filter(tables.Type.id < 10000)
|
types = session.query(tables.Type).filter(tables.Type.id < 10000)
|
||||||
types = list(util.order_by_name(types, tables.Type, language=french))
|
types = list(util.order_by_name(types, tables.Type, language=french))
|
||||||
assert types[0].name_map[french] == 'Acier', types[0].name_map[french]
|
assert types[0].name_map[french] == 'Acier', types[0].name_map[french]
|
||||||
assert types[-1].name_map[french] == u'Électrik', types[-1].name_map[french]
|
# SQLite doesn't know how to sort unicode properly, so accented charaters come last.
|
||||||
|
# Postgres doesn't have this problem.
|
||||||
|
assert types[-1].name_map[french] in (u'Électrik', u'Vol'), types[-1].name_map[french]
|
||||||
|
|
||||||
@parametrize('id', range(1, 10))
|
@parametrize('id', range(1, 10))
|
||||||
def test_get_pokemon_id(session, id):
|
def test_get_pokemon_id(session, id):
|
||||||
|
|
Loading…
Reference in a new issue