Skip to content

Commit

Permalink
fix: receipt link method
Browse files Browse the repository at this point in the history
Fix the HTTP method from POST to GET
on the get receipt link on financial manager.

relates to fccn/nau-technical#25
  • Loading branch information
igobranco committed Apr 26, 2024
1 parent e6ec930 commit c8799a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nau_extensions/financial_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def get_receipt_link(order):
token = _get_financial_manager_setting(site, "token")
try:
logger.info("Get receipt link for transaction id [%s]", transaction_id)
response = requests.post(
response = requests.get(
receipt_link_url,
headers={"Authorization": token},
timeout=10,
Expand Down
4 changes: 2 additions & 2 deletions nau_extensions/tests/test_financial_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def test_send_to_financial_manager_other_error(self):
},
},
)
@mock.patch.object(requests, "post", return_value=MockResponse(
@mock.patch.object(requests, "get", return_value=MockResponse(
json_data="https://example.com/somereceipt.pdf",
status_code=200,
))
Expand Down Expand Up @@ -616,7 +616,7 @@ def test_get_receipt_link_found(self, mock_fm_receipt_link):
},
},
)
@mock.patch.object(requests, "post", return_value=MockResponse(
@mock.patch.object(requests, "get", return_value=MockResponse(
status_code=404,
))
def test_get_receipt_link_not_found(self, mock_fm_receipt_link):
Expand Down

0 comments on commit c8799a3

Please sign in to comment.