Skip to content

Commit

Permalink
updated test to reflect latest changes on collection_id
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegerickx committed Nov 26, 2024
1 parent 8fc887e commit 76514ef
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/worldcerealtests/test_rdm_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def test_collections_from_rdm(
collections = interaction.get_collections(
geometry=sample_polygon, temporal_extent=sample_temporal_extent
)
collection_ids = [collection.id for collection in collections]
ref_ids = [collection.id for collection in collections]

assert collection_ids == ["Foo", "Bar"]
assert ref_ids == ["Foo", "Bar"]

bbox = sample_polygon.bounds
geom = f"Bbox={bbox[0]}&Bbox={bbox[1]}&Bbox={bbox[2]}&Bbox={bbox[3]}"
Expand Down Expand Up @@ -106,17 +106,16 @@ def test_download_samples(
result_gdf = interaction.download_samples(
geometry=sample_polygon,
temporal_extent=sample_temporal_extent,
columns=["col1", "col2", "collection_id", "geometry"],
columns=["col1", "col2", "ref_id", "geometry"],
ewoc_codes=["1", "2", "3", "4"],
subset=True,
)

# Check that col3 and valid_time indeed not included
# collection_id is automatically added
assert result_gdf.columns.tolist() == [
"col1",
"col2",
"collection_id",
"ref_id",
"geometry",
]

Expand Down

0 comments on commit 76514ef

Please sign in to comment.