Skip to content

Commit

Permalink
Call renamed status recorder from function
Browse files Browse the repository at this point in the history
  • Loading branch information
steventux committed Dec 23, 2024
1 parent c409c9b commit ce23a8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/functions/message_status/function_app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import azure.functions as func
import json
import logging
import message_status_recorder
import status_recorder
import request_verifier

app = func.FunctionApp()
Expand All @@ -24,7 +24,7 @@ def main(req: func.HttpRequest) -> func.HttpResponse:
body = {"status": "error"}
elif request_verifier.verify_signature(req.headers, req_body):
body_dict = json.loads(req_body)
message_status_recorder.save_message_statuses(body_dict)
status_recorder.save_statuses(body_dict)
status_code = 200
body = {"status": "success"}
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/message_status/test_function_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_main_verify_signature_success(mocker, payload):
mocker.patch("json.loads", return_value=payload)
mocker.patch("request_verifier.verify_headers", return_value=True)
mocker.patch("request_verifier.verify_signature", return_value=True)
mocker.patch("message_status_recorder.save_message_statuses")
mocker.patch("status_recorder.save_statuses")

request = create_http_request(payload)
func_call = function_app.main.build().get_user_function()
Expand Down

0 comments on commit ce23a8f

Please sign in to comment.