Skip to content

Commit

Permalink
generic getters + geonames fillers
Browse files Browse the repository at this point in the history
  • Loading branch information
wschuell committed Nov 20, 2023
1 parent 83281f1 commit 1c48330
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions tests/testmodule/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ def test_plz(maindb):
maindb.fill_db()


def test_geonames(maindb):
maindb.add_filler(zones.geonames.GeonamesFiller())
maindb.fill_db()


res_list = [
3,
4,
Expand All @@ -90,13 +95,13 @@ def country(request):
return request.param


# def test_hexagons(maindb, res, country):
# maindb.add_filler(
# zones.hexagons.HexagonsFiller(
# res=res, target_zone=country, target_zone_level="country"
# )
# )
# maindb.fill_db()
def test_hexagons(maindb, res, country):
maindb.add_filler(
zones.hexagons.HexagonsFiller(
res=res, target_zone=country, target_zone_level="country"
)
)
maindb.fill_db()


bezirk_list = [918, 922]
Expand All @@ -118,13 +123,13 @@ def res_bezirk(request):
return request.param


# def test_hexagons_bezirk(maindb, res_bezirk, bezirk):
# maindb.add_filler(
# zones.hexagons.HexagonsFiller(
# res=res_bezirk, target_zone=bezirk, target_zone_level="bezirk"
# )
# )
# maindb.fill_db()
def test_hexagons_bezirk(maindb, res_bezirk, bezirk):
maindb.add_filler(
zones.hexagons.HexagonsFiller(
res=res_bezirk, target_zone=bezirk, target_zone_level="bezirk"
)
)
maindb.fill_db()


getters_list = [
Expand Down Expand Up @@ -163,6 +168,12 @@ def res_bezirk(request):
nominatim_user_agent="gis_fillers_test",
),
),
(
generic_getters.ZipPointsGetter,
dict(
location_list=[("FR", "33400"), ("AT", "1080")] * 10,
),
),
]


Expand Down

0 comments on commit 1c48330

Please sign in to comment.