From 5ba861a11dfa7904c0f683dc84119f0c0fec874c Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Wed, 3 Apr 2024 11:50:25 +0200 Subject: [PATCH] [#4031] Update tests --- .../objects_api/tests/test_backend_v2.py | 27 ++++++++++--------- .../tests/test_update_payment_status_v2.py | 21 ++++++++------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py b/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py index b082d0d854..f4fdb21a39 100644 --- a/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py +++ b/src/openforms/registrations/contrib/objects_api/tests/test_backend_v2.py @@ -100,41 +100,44 @@ def test_submission_with_objects_api_v2(self): "organisatie_rsin": "000000000", "variables_mapping": [ # fmt: off + { + "variable_key": "location", + "target_path": ["geometry"], + }, { "variable_key": "age", - "target_path": ["age"], + "target_path": ["data", "age"], }, { "variable_key": "lastname", - "target_path": ["name", "last.name"] + "target_path": ["data", "name", "last.name"] }, { "variable_key": "now", - "target_path": ["submission_date"], + "target_path": ["data", "submission_date"], }, { "variable_key": "pdf_url", - "target_path": ["submission_pdf_url"], + "target_path": ["data", "submission_pdf_url"], }, { "variable_key": "csv_url", - "target_path": ["submission_csv_url"], + "target_path": ["data", "submission_csv_url"], }, { "variable_key": "payment_completed", - "target_path": ["submission_payment_completed"], + "target_path": ["data", "submission_payment_completed"], }, { "variable_key": "payment_amount", - "target_path": ["submission_payment_amount"], + "target_path": ["data", "submission_payment_amount"], }, { "variable_key": "payment_public_order_ids", - "target_path": ["submission_payment_public_ids"], + "target_path": ["data", "submission_payment_public_ids"], }, # fmt: on ], - "geometry_variable_key": "location", } plugin = ObjectsAPIRegistration(PLUGIN_IDENTIFIER) @@ -213,11 +216,11 @@ def test_submission_with_file_components(self): # fmt: off { "variable_key": "single_file", - "target_path": ["single_file"], + "target_path": ["data", "single_file"], }, { "variable_key": "multiple_files", - "target_path": ["multiple_files"] + "target_path": ["data", "multiple_files"] }, # fmt: on ], @@ -275,7 +278,7 @@ def test_submission_with_map_component_inside_data(self): # fmt: off { "variable_key": "location", - "target_path": ["pointCoordinates"], + "target_path": ["data", "pointCoordinates"], }, # fmt: on ], diff --git a/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py b/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py index c18303064f..c98ef9e6c4 100644 --- a/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py +++ b/src/openforms/registrations/contrib/objects_api/tests/test_update_payment_status_v2.py @@ -114,41 +114,44 @@ def test_update_payment_status(self): "organisatie_rsin": "000000000", "variables_mapping": [ # fmt: off + { + "variable_key": "location", + "target_path": ["geometry"], + }, { "variable_key": "age", - "target_path": ["age"], + "target_path": ["data", "age"], }, { "variable_key": "lastname", - "target_path": ["name", "last.name"] + "target_path": ["data", "name", "last.name"] }, { "variable_key": "now", - "target_path": ["submission_date"], + "target_path": ["data", "submission_date"], }, { "variable_key": "pdf_url", - "target_path": ["submission_pdf_url"], + "target_path": ["data", "submission_pdf_url"], }, { "variable_key": "csv_url", - "target_path": ["submission_csv_url"], + "target_path": ["data", "submission_csv_url"], }, { "variable_key": "payment_completed", - "target_path": ["submission_payment_completed"], + "target_path": ["data", "submission_payment_completed"], }, { "variable_key": "payment_amount", - "target_path": ["nested", "submission_payment_amount"], + "target_path": ["data", "nested", "submission_payment_amount"], }, { "variable_key": "payment_public_order_ids", - "target_path": ["submission_payment_public_ids"], + "target_path": ["data", "submission_payment_public_ids"], }, # fmt: on ], - "geometry_variable_key": "location", } SubmissionPaymentFactory.create(