]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/api/search/test_icu_query_analyzer.py
replace CASE construct with plpgsql function
[nominatim.git] / test / python / api / search / test_icu_query_analyzer.py
index 78cd2c4d7beb2c2e13cf5b1634ef84d0ec2ae796..faf8137526106a0e5db77b325c0fa73f30b94a05 100644 (file)
@@ -118,10 +118,10 @@ async def test_penalty_postcodes_and_housenumbers(conn, term, order):
 
     assert query.num_token_slots() == 1
 
-    torder = [(tl.tokens[0].penalty, tl.ttype) for tl in query.nodes[0].starting]
+    torder = [(tl.tokens[0].penalty, tl.ttype.name) for tl in query.nodes[0].starting]
     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
 async def test_category_words_only_at_beginning(conn):