X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1db098c05d54e50e1682747d446ef92f5ed0f9f6..ab6f35d83a350ead4eb12b59c4cbc050e48f93ee:/test/python/mock_icu_word_table.py diff --git a/test/python/mock_icu_word_table.py b/test/python/mock_icu_word_table.py index cde5e770..35a99b83 100644 --- a/test/python/mock_icu_word_table.py +++ b/test/python/mock_icu_word_table.py @@ -17,6 +17,14 @@ class MockIcuWordTable: conn.commit() + def add_full_word(self, word_id, word, word_token=None): + with self.conn.cursor() as cur: + cur.execute("""INSERT INTO word (word_id, word_token, type, word, info) + VALUES(%s, %s, 'W', %s, '{}'::jsonb)""", + (word_id, word or word_token, word)) + self.conn.commit() + + def add_special(self, word_token, word, cls, typ, oper): with self.conn.cursor() as cur: cur.execute("""INSERT INTO word (word_token, type, word, info)