X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f0a7850edf01ffb9419ddeb39dff181e6727f6e9..73953cbac95847740339d7a5ee3c0e5f142d93c5:/test/python/mocks.py diff --git a/test/python/mocks.py b/test/python/mocks.py index e95d5772..f9faaa93 100644 --- a/test/python/mocks.py +++ b/test/python/mocks.py @@ -98,6 +98,13 @@ class MockWordTable: WHERE class = 'place' and type = 'postcode'""") return set((row[0] for row in cur)) + def get_partial_words(self): + with self.conn.cursor() as cur: + cur.execute("""SELECT word_token, search_name_count FROM word + WHERE class is null and country_code is null + and not word_token like ' %'""") + return set((tuple(row) for row in cur)) + class MockPlacexTable: """ A placex table for testing.