From 6f6f461e65037070e7c7aea6f7654eb7f36492dd Mon Sep 17 00:00:00 2001 From: Graham Herceg Date: Fri, 17 Jan 2025 15:51:14 -0500 Subject: [PATCH] Fix failing test using mock TestAuditLoggingForFormSubmission::test_api_user_api_endpoint failed due to attempting to pass a Mock object to convert_xform_to_json --- corehq/apps/receiverwrapper/tests/test_audit_logging.py | 1 + 1 file changed, 1 insertion(+) diff --git a/corehq/apps/receiverwrapper/tests/test_audit_logging.py b/corehq/apps/receiverwrapper/tests/test_audit_logging.py index 9a5f08f8aa8a..5093fafeb221 100644 --- a/corehq/apps/receiverwrapper/tests/test_audit_logging.py +++ b/corehq/apps/receiverwrapper/tests/test_audit_logging.py @@ -23,6 +23,7 @@ def return_submission_run_resp(*args, **kwargs): @patch('corehq.apps.receiverwrapper.views.couchforms.get_instance_and_attachment', new=Mock(return_value=(Mock(), Mock()))) +@patch('corehq.apps.receiverwrapper.views.convert_xform_to_json', new=Mock()) @patch('corehq.apps.receiverwrapper.views._record_metrics', new=Mock()) @patch('corehq.apps.receiverwrapper.views.SubmissionPost.run', new=return_submission_run_resp) class TestAuditLoggingForFormSubmission(TestCase):