Skip to content

Conversation

ffd114
Copy link
Contributor

@ffd114 ffd114 commented Mar 15, 2022

I've tried adding custom_headers to override URL notifications API as mentioned here but it's not applied when testing using sandbox, after looking at the source, I think it's because the custom_headers is not merged

@Xaxxis
Copy link
Contributor

Xaxxis commented Mar 16, 2022

Hi, @ffd114 that's awesome! At Midtrans we do love community contribution, We will check your PR and review it soon

Thanks for your great contribution

@Xaxxis
Copy link
Contributor

Xaxxis commented Mar 16, 2022

Hi, @ffd114 after checking this, the issue is valid and has been solved by this PR. But we faced an error when try to run the unit test test_is_custom_headers_applied

# Fetch the headers from requests.request arguments
>           headers = mock_request.call_args.kwargs['headers']
E           TypeError: tuple indices must be integers or slices, not str

tests/test_http_client.py:71: TypeError

We will merge this request, improve and make the release. Thank you for your contribution, We are really appropriated

@ffd114
Copy link
Contributor Author

ffd114 commented Mar 16, 2022

Hi @Xaxxis glad that it worked, many thanks! Apologize for the unit test

@Xaxxis Xaxxis merged commit 11a9f26 into Midtrans:master Mar 17, 2022
@ffd114 ffd114 deleted the fix-custom-headers branch July 26, 2022 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants