aboutsummaryrefslogtreecommitdiff
path: root/tests/unit/test_util.py
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-03-31 23:57:59 +0200
committerDaniel Schadt <kingdread@gmx.de>2023-03-31 23:57:59 +0200
commit114274f900904070e941c4a544426b5d9d1267d2 (patch)
tree336bd54ac82b85253d62e355684114d2291a8b8e /tests/unit/test_util.py
parentace7c4ab80e7bd7ac2acdebede6437c56636e7b1 (diff)
downloadfietsboek-114274f900904070e941c4a544426b5d9d1267d2.tar.gz
fietsboek-114274f900904070e941c4a544426b5d9d1267d2.tar.bz2
fietsboek-114274f900904070e941c4a544426b5d9d1267d2.zip
hide ugliness of tile url function
We basically do the same hacky trick in two different places, so maybe we should put it into a separate function, test it, and if a better implementation arises, swap it.
Diffstat (limited to 'tests/unit/test_util.py')
-rw-r--r--tests/unit/test_util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/test_util.py b/tests/unit/test_util.py
index b35f218..949acb5 100644
--- a/tests/unit/test_util.py
+++ b/tests/unit/test_util.py
@@ -82,3 +82,12 @@ def test_tour_metadata(gpx_file):
@pytest.mark.parametrize('mps, kph', [(1, 3.6), (10, 36)])
def test_mps_to_kph(mps, kph):
assert util.mps_to_kph(mps) == pytest.approx(kph, 0.1)
+
+
+def test_tile_url(app_request):
+ route_url = util.tile_url(app_request, "tile-proxy", provider="bobby")
+
+ assert "{x}" in route_url
+ assert "{y}" in route_url
+ assert "{z}" in route_url
+ assert "bobby" in route_url