Skip to content

Commit

Permalink
FIX onramp_simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
ecino committed Mar 11, 2024
1 parent 79f6f14 commit ced1909
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion message_center_compassion/controllers/onramp.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Put any authorized sender here. Its address must be part of the headers
# in order to handle a request.
AUTHORIZED_SENDERS = [
"CHTest",
"OnrampSimulator",
"CISalesforce",
"CISFDC",
"CINetsuite",
Expand Down
2 changes: 1 addition & 1 deletion message_center_compassion/tests/onramp_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def setUp(self):
"Authorization": "Bearer fake_token",
"x-cim-MessageType": "http://schemas.ci.org/ci/services/"
"communications/2015/09/SBCStructured",
"x-cim-FromAddress": "CHTest",
"x-cim-FromAddress": "OnrampSimulator",
"x-cim-ToAddress": "CH",
}
self.opener.headers.update(headers)
Expand Down
5 changes: 3 additions & 2 deletions onramp_simulator/tools/onramp_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ def test_message(self, test_message):
"""Sends a message to any onramp.
:param test_message (onramp.simulator record): the message to send
"""
country_code = self.env["res.company"]._get_main_company().country_id.code
headers = {
"Content-type": "application/json",
"x-cim-MessageType": test_message.message_type_url,
"x-cim-FromAddress": "CHTest",
"x-cim-ToAddress": "SC",
"x-cim-FromAddress": "OnrampSimulator",
"x-cim-ToAddress": country_code,
}
url = test_message.server_url
body = test_message.body_json
Expand Down

0 comments on commit ced1909

Please sign in to comment.