Skip to content

Commit

Permalink
✅ [#4908] Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorvanwijk committed Dec 19, 2024
1 parent 3641483 commit 94e1d6c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/openforms/registrations/contrib/json/tests/test_backend.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from unittest.mock import patch

from django.test import TestCase

from openforms.appointments.contrib.qmatic.tests.factories import ServiceFactory
Expand Down Expand Up @@ -47,15 +49,17 @@ def test_submission_with_json_backend(self):
)

json_form_options = dict(
service=ServiceFactory(),
relative_api_endpoint="test",
service=ServiceFactory(api_root="http://example.com/api/v2"),
relative_api_endpoint="",
form_variables=["firstName", "lastName", "file", "auth_bsn"],
)
email_submission = JSONRegistration("json_plugin")

set_submission_reference(submission)

data_to_be_sent = email_submission.register_submission(submission, json_form_options)
with patch("zgw_consumers.nlx.NLXClient.post") as mock_post:
data_to_be_sent = email_submission.register_submission(submission, json_form_options)
mock_post.assert_called_once()

expected_data_to_be_sent = {
"values": {
Expand Down

0 comments on commit 94e1d6c

Please sign in to comment.