@@ -2647,6 +2647,13 @@ def test_udp_apply_neighborhood(api, udp_registry, set_parameter):
2647
2647
2648
2648
2649
2649
def test_user_defined_process_udp_vs_pdp_priority (api , udp_registry ):
2650
+ """
2651
+ See https://github.com/Open-EO/openeo-python-driver/issues/353
2652
+ This test was effectively asserting that the backend correctly follows API.
2653
+ Unfortunately, the prescribed behaviour of allowing to override predefined processes is somewhat questionable.
2654
+ On top of that, it lead to a major operational issue.
2655
+ When the above issue is resolved, this test should be adjusted to check the desired behaviour.
2656
+ """
2650
2657
api .set_auth_bearer_token (TEST_USER_BEARER_TOKEN )
2651
2658
# First without a defined "ndvi" UDP
2652
2659
api .check_result ("udp_ndvi.json" )
@@ -2659,12 +2666,12 @@ def test_user_defined_process_udp_vs_pdp_priority(api, udp_registry):
2659
2666
udp_registry .save (user_id = TEST_USER , process_id = "ndvi" , spec = api .load_json ("udp/myndvi.json" ))
2660
2667
api .check_result ("udp_ndvi.json" )
2661
2668
dummy = dummy_backend .get_collection ("S2_FOOBAR" )
2662
- assert dummy .ndvi .call_count == 1
2663
- assert dummy .reduce_dimension .call_count == 1
2664
- dummy .reduce_dimension .assert_called_with (reducer = mock .ANY , dimension = "bands" , context = None , env = mock .ANY )
2665
- args , kwargs = dummy .reduce_dimension .call_args
2666
- assert "red" in kwargs ["reducer" ]
2667
- assert "nir" in kwargs ["reducer" ]
2669
+ assert dummy .ndvi .call_count == 2
2670
+ assert dummy .reduce_dimension .call_count == 0
2671
+ # dummy.reduce_dimension.assert_called_with(reducer=mock.ANY, dimension="bands", context=None, env=mock.ANY)
2672
+ # args, kwargs = dummy.reduce_dimension.call_args
2673
+ # assert "red" in kwargs["reducer"]
2674
+ # assert "nir" in kwargs["reducer"]
2668
2675
2669
2676
2670
2677
def test_execute_03_style_filter_bbox (api ):
0 commit comments