-@pytest.mark.parametrize('hnr', ['123a', '1', '101'])
-def test_process_place_housenumbers_simple(analyzer, create_housenumbers, hnr):
- info = analyzer.process_place({'address': {'housenumber' : hnr}})
+class TestHousenumberName:
+
+ @staticmethod
+ @pytest.fixture(autouse=True)
+ def setup_create_housenumbers(temp_db_cursor):
+ temp_db_cursor.execute("""CREATE OR REPLACE FUNCTION create_housenumbers(
+ housenumbers TEXT[],
+ OUT tokens TEXT, OUT normtext TEXT)
+ AS $$
+ SELECT housenumbers::TEXT, array_to_string(housenumbers, ';')
+ $$ LANGUAGE SQL""")
+
+
+ @staticmethod
+ @pytest.mark.parametrize('hnr', ['123a', '1', '101'])
+ def test_process_place_housenumbers_simple(analyzer, hnr):
+ info = analyzer.process_place({'address': {'housenumber' : hnr}})