Skip to content

Commit

Permalink
Fix failing test using mock
Browse files Browse the repository at this point in the history
TestAuditLoggingForFormSubmission::test_api_user_api_endpoint failed due
to attempting to pass a Mock object to convert_xform_to_json
  • Loading branch information
gherceg committed Jan 17, 2025
1 parent 7ed982b commit 6f6f461
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions corehq/apps/receiverwrapper/tests/test_audit_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6f6f461

Please sign in to comment.