simplify property test table implementation

This commit is contained in:
Sarah Hoffmann
2026-02-12 21:15:03 +01:00
parent d691cfc35d
commit dd332caa4d
2 changed files with 9 additions and 21 deletions

View File

@@ -9,8 +9,6 @@ Custom mocks for testing.
"""
import itertools
from nominatim_db.db import properties
class MockPlacexTable:
""" A placex table for testing.
@@ -66,20 +64,3 @@ class MockPlacexTable:
place_id = cur.fetchone()[0]
self.conn.commit()
return place_id
class MockPropertyTable:
""" A property table for testing.
"""
def __init__(self, conn):
self.conn = conn
def set(self, name, value):
""" Set a property in the table to the given value.
"""
properties.set_property(self.conn, name, value)
def get(self, name):
""" Set a property in the table to the given value.
"""
return properties.get_property(self.conn, name)