Skip to content

Commit

Permalink
fix map endpoint tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hrodmn committed Nov 26, 2024
1 parent 039b8c8 commit 4bfe7cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,16 @@ def test_histogram_error(app):


def test_map_without_params(app):
response = app.get("/map")
response = app.get("/WebMercatorQuad/map")
assert response.status_code == 200
assert response.headers["Content-Type"] == "text/html; charset=utf-8"
assert find_string_in_stream(response, "Step 1: Enter the URL of your Zarr store")


def test_map_with_params(app):
response = app.get("/map", params={"url": test_zarr_store, "variable": "CDD0"})
response = app.get(
"/WebMercatorQuad/map", params={"url": test_zarr_store, "variable": "CDD0"}
)
assert response.status_code == 200
assert response.headers["Content-Type"] == "text/html; charset=utf-8"
assert find_string_in_stream(response, "<div id='map' class=\"hidden\"></div>")

0 comments on commit 4bfe7cb

Please sign in to comment.