]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/api/search/test_legacy_query_analyzer.py
replace CASE construct with plpgsql function
[nominatim.git] / test / python / api / search / test_legacy_query_analyzer.py
index c21158531b3549ec4d54369ff587b7f377810f19..cdea6ede7cd842fa0c0f25b6915b8c0fcb2f0fe9 100644 (file)
@@ -195,11 +195,10 @@ async def test_penalty_postcodes_and_housenumbers(conn, term, order):
 
     assert query.num_token_slots() == 1
 
 
     assert query.num_token_slots() == 1
 
-    torder = [(tl.tokens[0].penalty, tl.ttype) for tl in query.nodes[0].starting]
-    print(query.nodes[0].starting)
+    torder = [(tl.tokens[0].penalty, tl.ttype.name) for tl in query.nodes[0].starting]
     torder.sort()
 
     torder.sort()
 
-    assert [t[1] for t in torder] == [TokenType[o] for o in order]
+    assert [t[1] for t in torder] == order
 
 
 @pytest.mark.asyncio
 
 
 @pytest.mark.asyncio