diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-06-29 20:38:08 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-06-29 20:38:08 +0200 |
commit | e6d18b9205e1baf86df1e0cb3c5bf54c9489976f (patch) | |
tree | f85dd39f647edc1f1700e4cefc5ddba2e326d2cd | |
parent | 99e3e33cf0a529fa3fe71af98ce5017054dbb8ea (diff) | |
download | fietsboek-e6d18b9205e1baf86df1e0cb3c5bf54c9489976f.tar.gz fietsboek-e6d18b9205e1baf86df1e0cb3c5bf54c9489976f.tar.bz2 fietsboek-e6d18b9205e1baf86df1e0cb3c5bf54c9489976f.zip |
tileproxy: fix testing fake response
-rw-r--r-- | fietsboek/views/tileproxy.py | 5 |
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__}", } |