Skip to content

Commit

Permalink
Move test to new class.
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileSonneveld committed Oct 2, 2024
1 parent 6c943a2 commit 8b8c072
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/rest/datacube/test_datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ def _get_leaf_node(cube, force_flat=True) -> dict:


class TestDataCube:
def test_load_stac_connectionless(self, connection):
expected_graph = {
"loadstac1": {
"process_id": "load_stac",
"arguments": {"url": "https://provider.test/dataset"},
"result": True,
}
}
cube = DataCube.load_stac("https://provider.test/dataset")
assert cube.flat_graph() == expected_graph
cube2 = connection.load_stac("https://provider.test/dataset")
assert cube2.flat_graph() == expected_graph

def test_load_collection_connectionless_basic(self):
cube = DataCube.load_collection("T3")
assert cube.flat_graph() == {
Expand Down Expand Up @@ -157,19 +170,6 @@ def test_filter_temporal_basic_extent(s2cube):
assert graph['arguments']['extent'] == ["2016-01-01", "2016-03-10"]


def test_load_stac_connectionless(connection):
expected_graph = {
"loadstac1": {
"process_id": "load_stac",
"arguments": {"url": "https://provider.test/dataset"},
"result": True,
}
}
cube = DataCube.load_stac("https://provider.test/dataset")
assert cube.flat_graph() == expected_graph
cube2 = connection.load_stac("https://provider.test/dataset")
assert cube2.flat_graph() == expected_graph

@pytest.mark.parametrize(
"args,kwargs,extent",
[
Expand Down

0 comments on commit 8b8c072

Please sign in to comment.