Skip to content

Commit 441d732

Browse files
feat!: MVR release preparation (#766)
* feat!: MVR release preparation * fix: added test for json data in http client
1 parent 7c16b02 commit 441d732

File tree

3 files changed

+30
-43
lines changed

3 files changed

+30
-43
lines changed

CHANGES.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,6 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6-
[2024-02-09] Version 9.0.0-rc.2
7-
-------------------------------
8-
**Library - Chore**
9-
- [PR #765](https://github.com/twilio/twilio-python/pull/765): disables cluster test. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
10-
11-
**Flex**
12-
- Adding `flex_instance_sid` to Flex Configuration
13-
14-
**Insights**
15-
- add flag to restrict access to unapid customers
16-
17-
**Lookups**
18-
- Remove `carrier` field from `sms_pumping_risk` and leave `carrier_risk_category` **(breaking change)**
19-
- Remove carrier information from call forwarding package **(breaking change)**
20-
21-
**Messaging**
22-
- Add update instance endpoints to us_app_to_person api
23-
24-
**Push**
25-
- Migrated to new Push API V4 with Resilient Notification Delivery.
26-
27-
**Trusthub**
28-
- Add optional field NotificationEmail to the POST /v1/ComplianceInquiries/Customers/Initialize API
29-
30-
**Verify**
31-
- `Tags` property added again to Public Docs **(breaking change)**
32-
33-
34-
[2024-01-08] Version 9.0.0-rc.1
35-
-------------------------------
36-
**Library - Chore**
37-
- [PR #743](https://github.com/twilio/twilio-python/pull/743): sync with main. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
38-
39-
40-
[2023-12-06] Version 9.0.0-rc.0
41-
---------------------------
42-
- Release Candidate preparation
43-
446
[2023-12-14] Version 8.11.0
457
---------------------------
468
**Library - Chore**

UPGRADE.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
_`MAJOR` version bumps will have upgrade notes
44
posted here._
55

6-
## [2023-12-06] 8.x.x to 9.x.x-rc.x
7-
8-
---
6+
## [2024-02-20] 8.x.x to 9.x.x
97
### Overview
108

11-
#### Twilio Python Helper Library’s major version 9.0.0-rc.x is now available. We ensured that you can upgrade to Python helper Library 9.0.0-rc.x version without any breaking changes
9+
##### Twilio Python Helper Library’s major version 9.0.0 is now available. We ensured that you can upgrade to Python helper Library 9.0.0 version without any breaking changes of existing apis
1210

13-
Support for JSON payloads has been added in the request body
11+
Behind the scenes Python Helper is now auto-generated via OpenAPI with this release. This enables us to rapidly add new features and enhance consistency across versions and languages.
12+
We're pleased to inform you that version 9.0.0 adds support for the application/json content type in the request body.
1413

1514

1615
## [2023-04-05] 7.x.x to 8.x.x

tests/unit/http/test_http_client.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,32 @@ def test_last_request_last_response_exist(self):
145145
"testing-unicode: Ω≈ç√, 💩", self.client._test_only_last_response.text
146146
)
147147

148+
def test_request_with_json(self):
149+
self.request_mock.url = "https://api.twilio.com/"
150+
self.request_mock.headers = {"Host": "other.twilio.com"}
151+
152+
self.client.request(
153+
"doesnt-matter-method",
154+
"doesnt-matter-url",
155+
{"params-value": "params-key"},
156+
{"json-key": "json-value"},
157+
{"Content-Type": "application/json"},
158+
)
159+
160+
self.assertIsNotNone(self.client._test_only_last_request)
161+
self.assertEqual(
162+
{"Content-Type": "application/json"},
163+
self.client._test_only_last_request.headers,
164+
)
165+
166+
self.assertIsNotNone(self.client._test_only_last_response)
167+
168+
if self.client._test_only_last_response is not None:
169+
self.assertEqual(200, self.client._test_only_last_response.status_code)
170+
self.assertEqual(
171+
"testing-unicode: Ω≈ç√, 💩", self.client._test_only_last_response.text
172+
)
173+
148174
def test_last_response_empty_on_error(self):
149175
self.session_mock.send.side_effect = Exception("voltron")
150176

0 commit comments

Comments
 (0)