Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailroom client should use content-type header on responses to know whether to parse as JSON #5249

Merged
merged 1 commit into from
May 24, 2024

Conversation

rowanseymour
Copy link
Member

And for convenience added MockJsonResponse for tests.

Copy link

sentry-io bot commented May 23, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: temba/mailroom/client.py

Function Unhandled Issue
_request MailroomException: ('contact/create', {'org_id': 7159, 'user_id': 46905, 'contact': {'name': 'vachyutarao', 'languag... ...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

@rowanseymour rowanseymour force-pushed the mailroom_client_json branch 3 times, most recently from e529c8f to 3208410 Compare May 23, 2024 21:03
@@ -51,27 +47,6 @@ def raise_for_status(self):
raise HTTPError(request=self.request, response=self)


class MockPost:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not used

@rowanseymour rowanseymour marked this pull request as draft May 23, 2024 21:17
@rowanseymour rowanseymour marked this pull request as ready for review May 23, 2024 22:21
Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (1ddfdad) to head (c427867).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #5249   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          474       474           
  Lines        25036     25124   +88     
=========================================
+ Hits         25036     25124   +88     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rowanseymour rowanseymour merged commit 93b9e18 into main May 24, 2024
5 checks passed
@rowanseymour rowanseymour deleted the mailroom_client_json branch May 24, 2024 13:35
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants