From e6d18b9205e1baf86df1e0cb3c5bf54c9489976f Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Thu, 29 Jun 2023 20:38:08 +0200 Subject: tileproxy: fix testing fake response --- fietsboek/views/tileproxy.py | 5 +++-- 1 file 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__}", } -- cgit v1.2.3