Skip to content

Commit

Permalink
[#4031] Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Viicos committed Apr 3, 2024
1 parent e7957f5 commit 5ba861a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
],
Expand Down Expand Up @@ -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
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 5ba861a

Please sign in to comment.