aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-06-29 20:38:08 +0200
committerDaniel Schadt <kingdread@gmx.de>2023-06-29 20:38:08 +0200
commite6d18b9205e1baf86df1e0cb3c5bf54c9489976f (patch)
treef85dd39f647edc1f1700e4cefc5ddba2e326d2cd
parent99e3e33cf0a529fa3fe71af98ce5017054dbb8ea (diff)
downloadfietsboek-e6d18b9205e1baf86df1e0cb3c5bf54c9489976f.tar.gz
fietsboek-e6d18b9205e1baf86df1e0cb3c5bf54c9489976f.tar.bz2
fietsboek-e6d18b9205e1baf86df1e0cb3c5bf54c9489976f.zip
tileproxy: fix testing fake response
-rw-r--r--fietsboek/views/tileproxy.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fietsboek/views/tileproxy.py b/fietsboek/views/tileproxy.py
index 07e4103..fe5cbae 100644
--- a/fietsboek/views/tileproxy.py
+++ b/fietsboek/views/tileproxy.py
@@ -334,8 +334,9 @@ def tile_proxy(request):
url = tile_sources[provider].url.format(x=x, y=y, z=z, s=random.choice("abc"))
# Avoid doing actual requests during tests
- if url.startswith("http://localhost:0/"):
- return Response("", content_type="image/png")
+ if url.startswith("http://localhost:0"):
+ LOGGER.debug("Skipping tile proxy request for testing URL")
+ return Response(b"", content_type="image/png")
headers = {
"user-agent": f"Fietsboek-Tile-Proxy/{__VERSION__}",
}