Skip to content

Commit

Permalink
Updating tests that failed in CI (#1346)
Browse files Browse the repository at this point in the history
Co-authored-by: ericboucher <[email protected]>
  • Loading branch information
gislawill and ericboucher authored Sep 25, 2024
1 parent abe97d0 commit 0bce0ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file added api/app/tests/myanmar_rainfall_dekad.tif
Binary file not shown.
7 changes: 5 additions & 2 deletions api/app/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import pytest
import rasterio
import requests
import schemathesis
from app.database.database import AlertsDataBase
from app.main import app
Expand Down Expand Up @@ -102,11 +103,12 @@ def test_stats_endpoint1():
Call /stats with known-good parameters.
This endpoint can be slow (>1 min) so this test is deactivated by default.
"""

response = client.post(
"/stats",
headers={"Accept": "application/json"},
json={
"geotiff_url": "https://api.earthobservation.vam.wfp.org/ows/?service=WCS&request=GetCoverage&version=2.0.0&coverageId=wp_pop_cicunadj&subset=Long(95.71,96.68)&subset=Lat(19.42,20.33)",
"geotiff_url": "https://prism-wfp.s3.us-east-2.amazonaws.com/myanmar_rainfall_dekad.tif",
"zones_url": "https://prism-admin-boundaries.s3.us-east-2.amazonaws.com/mmr_admin_boundaries.json",
"group_by": "TS_PCODE",
# TODO - re-add once geonode is back online.
Expand Down Expand Up @@ -165,11 +167,12 @@ def test_stats_endpoint_masked():
"""
Call /stats with known-good parameters with a geotiff mask.
"""

response = client.post(
"/stats",
headers={"Accept": "application/json"},
json={
"geotiff_url": "https://api.earthobservation.vam.wfp.org/ows/?service=WCS&request=GetCoverage&version=2.0.0&coverageId=wp_pop_cicunadj&subset=Long(95.71,96.68)&subset=Lat(19.42,20.33)",
"geotiff_url": "https://prism-wfp.s3.us-east-2.amazonaws.com/myanmar_rainfall_dekad.tif",
"zones_url": "https://prism-admin-boundaries.s3.us-east-2.amazonaws.com/mmr_admin_boundaries.json",
"mask_url": "https://api.earthobservation.vam.wfp.org/ows/?service=WCS&request=GetCoverage&version=1.0.0&coverage=hf_water_mmr&crs=EPSG%3A4326&bbox=92.2%2C9.7%2C101.2%2C28.5&width=1098&height=2304&format=GeoTIFF&time=2022-08-11",
"group_by": "TS_PCODE",
Expand Down

0 comments on commit 0bce0ee

Please sign in to comment.