@@ -2647,6 +2647,13 @@ def test_udp_apply_neighborhood(api, udp_registry, set_parameter):
26472647
26482648
26492649def 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+ """
26502657 api .set_auth_bearer_token (TEST_USER_BEARER_TOKEN )
26512658 # First without a defined "ndvi" UDP
26522659 api .check_result ("udp_ndvi.json" )
@@ -2659,12 +2666,12 @@ def test_user_defined_process_udp_vs_pdp_priority(api, udp_registry):
26592666 udp_registry .save (user_id = TEST_USER , process_id = "ndvi" , spec = api .load_json ("udp/myndvi.json" ))
26602667 api .check_result ("udp_ndvi.json" )
26612668 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"]
26682675
26692676
26702677def test_execute_03_style_filter_bbox (api ):
0 commit comments