Skip to content

Commit

Permalink
Add line explaining no data was available in the selected area
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Clerkx committed Dec 18, 2023
1 parent 25ead24 commit 60e683a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@
<img src="data:image/png;base64,{{ dataset.image_base64 }}" />
{% endif %}

{% endfor %}
{% endfor %}
{% if not data.datasets %}
<p>Unfortunately there was no data available in the region you selected.</p>
{% endif %}
8 changes: 8 additions & 0 deletions App/functions/report-python-cloud-run/tests/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ def test_main_handler(client):
assert r.status_code == 200


def test_main_handler_empty_polygon(client):
r = client.get(
"/?polygon=%7B%22coordinates%22%3A%5B%5B%5B-4.918202520050414%2C58.52351957545039%5D%2C%5B-1.2336741157175197%2C57.89499975654721%5D%2C%5B-0.6371314216833355%2C59.83577280094184%5D%2C%5B-4.918202520050414%2C58.52351957545039%5D%5D%5D%2C%22type%22%3A%22Polygon%22%7D"
)

assert r.status_code == 200


# def test_handler_with_env_variable(client):
# os.environ["NAME"] = "Foo"
# r = client.get("/")
Expand Down

0 comments on commit 60e683a

Please sign in to comment.