Skip to content

Commit 4683b58

Browse files
committed
[Librarian] Regenerated @ 9e43c4b1c21f11427158cfc8a409854c419cd158
1 parent 951fc87 commit 4683b58

36 files changed

+2495
-1841
lines changed

CHANGES.md

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

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

6+
[2022-08-10] Version 7.12.1
7+
---------------------------
8+
**Routes**
9+
- Inbound Proccessing Region API - Public GA
10+
11+
**Supersim**
12+
- Allow updating `DataLimit` on a Fleet
13+
14+
615
[2022-07-21] Version 7.12.0
716
---------------------------
817
**Flex**

tests/integration/api/v2010/account/test_application.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def test_create_response(self):
5050
"voice_fallback_method": "GET",
5151
"voice_fallback_url": "http://www.example.com/voice-callback",
5252
"voice_method": "GET",
53-
"voice_url": "http://example.com"
53+
"voice_url": "http://example.com",
54+
"public_application_connect_enabled": true
5455
}
5556
'''
5657
))
@@ -119,7 +120,8 @@ def test_fetch_response(self):
119120
"voice_fallback_method": "GET",
120121
"voice_fallback_url": "http://www.example.com/voice-callback",
121122
"voice_method": "GET",
122-
"voice_url": "http://example.com"
123+
"voice_url": "http://example.com",
124+
"public_application_connect_enabled": false
123125
}
124126
'''
125127
))
@@ -167,7 +169,8 @@ def test_read_full_response(self):
167169
"voice_fallback_method": "POST",
168170
"voice_fallback_url": null,
169171
"voice_method": "POST",
170-
"voice_url": null
172+
"voice_url": null,
173+
"public_application_connect_enabled": false
171174
}
172175
],
173176
"end": 0,
@@ -246,7 +249,8 @@ def test_update_response(self):
246249
"voice_fallback_method": "GET",
247250
"voice_fallback_url": "http://www.example.com/voice-callback",
248251
"voice_method": "GET",
249-
"voice_url": "http://example.com"
252+
"voice_url": "http://example.com",
253+
"public_application_connect_enabled": true
250254
}
251255
'''
252256
))
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class AppTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.microvisor.v1.apps.list()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://microvisor.twilio.com/v1/Apps',
26+
))
27+
28+
def test_read_empty_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"apps": [],
34+
"meta": {
35+
"page": 0,
36+
"page_size": 50,
37+
"first_page_url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=0",
38+
"previous_page_url": null,
39+
"url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=0",
40+
"next_page_url": null,
41+
"key": "apps"
42+
}
43+
}
44+
'''
45+
))
46+
47+
actual = self.client.microvisor.v1.apps.list()
48+
49+
self.assertIsNotNone(actual)
50+
51+
def test_read_full_response(self):
52+
self.holodeck.mock(Response(
53+
200,
54+
'''
55+
{
56+
"apps": [
57+
{
58+
"sid": "KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
59+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
60+
"hash": "hash",
61+
"unique_name": "unique name",
62+
"date_created": "2015-07-30T20:00:00Z",
63+
"date_updated": "2015-07-30T20:00:00Z",
64+
"url": "https://microvisor.twilio.com/v1/Apps/KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
65+
}
66+
],
67+
"meta": {
68+
"page": 0,
69+
"page_size": 50,
70+
"first_page_url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=0",
71+
"previous_page_url": null,
72+
"url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=0",
73+
"next_page_url": null,
74+
"key": "apps"
75+
}
76+
}
77+
'''
78+
))
79+
80+
actual = self.client.microvisor.v1.apps.list()
81+
82+
self.assertIsNotNone(actual)
83+
84+
def test_fetch_request(self):
85+
self.holodeck.mock(Response(500, ''))
86+
87+
with self.assertRaises(TwilioException):
88+
self.client.microvisor.v1.apps("KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
89+
90+
self.holodeck.assert_has_request(Request(
91+
'get',
92+
'https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
93+
))
94+
95+
def test_fetch_response(self):
96+
self.holodeck.mock(Response(
97+
200,
98+
'''
99+
{
100+
"sid": "KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
101+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
102+
"hash": "hash",
103+
"unique_name": "look at this crazy app",
104+
"date_created": "2015-07-30T20:00:00Z",
105+
"date_updated": "2015-07-30T20:00:00Z",
106+
"url": "https://microvisor.twilio.com/v1/Apps/KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
107+
}
108+
'''
109+
))
110+
111+
actual = self.client.microvisor.v1.apps("KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
112+
113+
self.assertIsNotNone(actual)
114+
115+
def test_delete_request(self):
116+
self.holodeck.mock(Response(500, ''))
117+
118+
with self.assertRaises(TwilioException):
119+
self.client.microvisor.v1.apps("KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
120+
121+
self.holodeck.assert_has_request(Request(
122+
'delete',
123+
'https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
124+
))
125+
126+
def test_delete_response(self):
127+
self.holodeck.mock(Response(
128+
204,
129+
None,
130+
))
131+
132+
actual = self.client.microvisor.v1.apps("KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
133+
134+
self.assertTrue(actual)
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class DeviceTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.microvisor.v1.devices.list()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://microvisor.twilio.com/v1/Devices',
26+
))
27+
28+
def test_read_empty_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"devices": [],
34+
"meta": {
35+
"page": 0,
36+
"page_size": 50,
37+
"first_page_url": "https://microvisor.twilio.com/v1/Devices?PageSize=50&Page=0",
38+
"previous_page_url": null,
39+
"url": "https://microvisor.twilio.com/v1/Devices?PageSize=50&Page=0",
40+
"next_page_url": null,
41+
"key": "devices"
42+
}
43+
}
44+
'''
45+
))
46+
47+
actual = self.client.microvisor.v1.devices.list()
48+
49+
self.assertIsNotNone(actual)
50+
51+
def test_read_full_response(self):
52+
self.holodeck.mock(Response(
53+
200,
54+
'''
55+
{
56+
"devices": [
57+
{
58+
"sid": "UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
59+
"unique_name": "This is my device; there are many like it.",
60+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61+
"app": {
62+
"target_sid": "KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
63+
"target_hash": null,
64+
"date_targeted": "2021-01-01T12:34:56Z",
65+
"update_status": "up-to-date",
66+
"update_error_code": 0,
67+
"reported_sid": "KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
68+
"date_reported": "2021-01-01T12:34:56Z"
69+
},
70+
"logging": {
71+
"enabled": true,
72+
"date_expires": "2021-01-01T12:34:56Z"
73+
},
74+
"date_created": "2021-01-01T12:34:56Z",
75+
"date_updated": "2021-01-01T12:34:56Z",
76+
"url": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
77+
}
78+
],
79+
"meta": {
80+
"page": 0,
81+
"page_size": 50,
82+
"first_page_url": "https://microvisor.twilio.com/v1/Devices?PageSize=50&Page=0",
83+
"previous_page_url": null,
84+
"url": "https://microvisor.twilio.com/v1/Devices?PageSize=50&Page=0",
85+
"next_page_url": null,
86+
"key": "devices"
87+
}
88+
}
89+
'''
90+
))
91+
92+
actual = self.client.microvisor.v1.devices.list()
93+
94+
self.assertIsNotNone(actual)
95+
96+
def test_fetch_request(self):
97+
self.holodeck.mock(Response(500, ''))
98+
99+
with self.assertRaises(TwilioException):
100+
self.client.microvisor.v1.devices("UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
101+
102+
self.holodeck.assert_has_request(Request(
103+
'get',
104+
'https://microvisor.twilio.com/v1/Devices/UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
105+
))
106+
107+
def test_fetch_response(self):
108+
self.holodeck.mock(Response(
109+
200,
110+
'''
111+
{
112+
"sid": "UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
113+
"unique_name": "This is my device; there are many like it.",
114+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
115+
"app": {
116+
"target_sid": "KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
117+
"target_hash": null,
118+
"date_targeted": "2021-01-01T12:34:56Z",
119+
"update_status": "up-to-date",
120+
"update_error_code": 0,
121+
"reported_sid": "KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
122+
"date_reported": "2021-01-01T12:34:56Z"
123+
},
124+
"logging": {
125+
"enabled": true,
126+
"date_expires": "2021-01-01T12:34:56Z"
127+
},
128+
"date_created": "2021-01-01T12:34:56Z",
129+
"date_updated": "2021-01-01T12:34:56Z",
130+
"url": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
131+
}
132+
'''
133+
))
134+
135+
actual = self.client.microvisor.v1.devices("UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
136+
137+
self.assertIsNotNone(actual)
138+
139+
def test_update_request(self):
140+
self.holodeck.mock(Response(500, ''))
141+
142+
with self.assertRaises(TwilioException):
143+
self.client.microvisor.v1.devices("UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
144+
145+
self.holodeck.assert_has_request(Request(
146+
'post',
147+
'https://microvisor.twilio.com/v1/Devices/UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
148+
))
149+
150+
def test_update_response(self):
151+
self.holodeck.mock(Response(
152+
200,
153+
'''
154+
{
155+
"sid": "UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
156+
"unique_name": "UniqueName",
157+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
158+
"app": {
159+
"target_sid": "KAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
160+
"target_hash": null,
161+
"date_targeted": "2021-01-01T12:34:56Z",
162+
"update_status": "pending",
163+
"update_error_code": 0,
164+
"reported_sid": null,
165+
"date_reported": "2021-01-01T12:34:56Z"
166+
},
167+
"logging": {
168+
"enabled": false,
169+
"date_expires": null
170+
},
171+
"date_created": "2015-07-30T20:00:00Z",
172+
"date_updated": "2015-07-30T20:00:00Z",
173+
"url": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
174+
}
175+
'''
176+
))
177+
178+
actual = self.client.microvisor.v1.devices("UVXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
179+
180+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)