Skip to content

Commit a300426

Browse files
committed
[Librarian] Regenerated @ aba733510faf650b1dea87a67f502050a0619142
1 parent ce8ccc3 commit a300426

File tree

27 files changed

+2970
-68
lines changed

27 files changed

+2970
-68
lines changed

CHANGES.md

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

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

6+
[2020-08-19] Version 6.45.0
7+
---------------------------
8+
**Library - Chore**
9+
- [PR #536](https://github.com/twilio/twilio-python/pull/536): update GitHub branch references to use HEAD. Thanks to [@thinkingserious](https://github.com/thinkingserious)!
10+
11+
**Conversations**
12+
- Allow Identity addition to Participants
13+
14+
**Events**
15+
- Sinks API Get all Sinks
16+
17+
**Proxy**
18+
- Clarified usage of FailOnParticipantConflict param as experimental
19+
- Add FailOnParticipantConflict param to Proxy Session create and Proxy Participant create
20+
21+
**Supersim**
22+
- Add fleet, network, and isoCountryCode to the UsageRecords resource
23+
- Change sort order of UsageRecords from ascending to descending with respect to start time field, records are now returned newest to oldest
24+
25+
**Wireless**
26+
- Removed `Start` and `End` parameters from the Data Sessions list endpoint. **(breaking change)**
27+
28+
629
[2020-08-05] Version 6.44.2
730
---------------------------
831
**Messaging**

tests/integration/events/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 SinkTestTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.events.v1.sinks("DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.sink_test.create()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'post',
26+
'https://events.twilio.com/v1/Sinks/DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Test',
27+
))
28+
29+
def test_create_response(self):
30+
self.holodeck.mock(Response(
31+
201,
32+
'''
33+
{
34+
"result": "valid"
35+
}
36+
'''
37+
))
38+
39+
actual = self.client.events.v1.sinks("DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
40+
.sink_test.create()
41+
42+
self.assertIsNotNone(actual)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 SinkValidateTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.events.v1.sinks("DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.sink_validate.create(test_id="test_id")
23+
24+
values = {'TestId': "test_id", }
25+
26+
self.holodeck.assert_has_request(Request(
27+
'post',
28+
'https://events.twilio.com/v1/Sinks/DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Validate',
29+
data=values,
30+
))
31+
32+
def test_create_response(self):
33+
self.holodeck.mock(Response(
34+
201,
35+
'''
36+
{
37+
"result": "valid"
38+
}
39+
'''
40+
))
41+
42+
actual = self.client.events.v1.sinks("DGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
43+
.sink_validate.create(test_id="test_id")
44+
45+
self.assertIsNotNone(actual)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
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 SubscribedEventTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.subscribed_events.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents',
27+
))
28+
29+
def test_read_empty_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"types": [],
35+
"meta": {
36+
"page": 0,
37+
"page_size": 10,
38+
"first_page_url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=10&Page=0",
39+
"previous_page_url": null,
40+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=10&Page=0",
41+
"next_page_url": null,
42+
"key": "types"
43+
}
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
49+
.subscribed_events.list()
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_read_results_response(self):
54+
self.holodeck.mock(Response(
55+
200,
56+
'''
57+
{
58+
"types": [
59+
{
60+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61+
"type": "Voice.Calls",
62+
"version": 2,
63+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
64+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/Voice.Calls"
65+
},
66+
{
67+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
68+
"type": "Video.Rooms",
69+
"version": 15,
70+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
71+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/Video.Rooms"
72+
}
73+
],
74+
"meta": {
75+
"page": 0,
76+
"page_size": 50,
77+
"first_page_url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=50&Page=0",
78+
"previous_page_url": null,
79+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents?PageSize=50&Page=0",
80+
"next_page_url": null,
81+
"key": "types"
82+
}
83+
}
84+
'''
85+
))
86+
87+
actual = self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
88+
.subscribed_events.list()
89+
90+
self.assertIsNotNone(actual)
91+
92+
def test_create_request(self):
93+
self.holodeck.mock(Response(500, ''))
94+
95+
with self.assertRaises(TwilioException):
96+
self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
97+
.subscribed_events.create(type="type")
98+
99+
values = {'Type': "type", }
100+
101+
self.holodeck.assert_has_request(Request(
102+
'post',
103+
'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents',
104+
data=values,
105+
))
106+
107+
def test_create_all_fields_response(self):
108+
self.holodeck.mock(Response(
109+
201,
110+
'''
111+
{
112+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
113+
"type": "com.twilio.voice.call.initiated",
114+
"version": 5,
115+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
116+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.initiated"
117+
}
118+
'''
119+
))
120+
121+
actual = self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
122+
.subscribed_events.create(type="type")
123+
124+
self.assertIsNotNone(actual)
125+
126+
def test_create_no_version_response(self):
127+
self.holodeck.mock(Response(
128+
201,
129+
'''
130+
{
131+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
132+
"type": "com.twilio.voice.call.recorded",
133+
"version": 2,
134+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
135+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.recorded"
136+
}
137+
'''
138+
))
139+
140+
actual = self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
141+
.subscribed_events.create(type="type")
142+
143+
self.assertIsNotNone(actual)
144+
145+
def test_update_request(self):
146+
self.holodeck.mock(Response(500, ''))
147+
148+
with self.assertRaises(TwilioException):
149+
self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
150+
.subscribed_events("type").update(version=1)
151+
152+
values = {'Version': 1, }
153+
154+
self.holodeck.assert_has_request(Request(
155+
'post',
156+
'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents/type',
157+
data=values,
158+
))
159+
160+
def test_update_response(self):
161+
self.holodeck.mock(Response(
162+
200,
163+
'''
164+
{
165+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
166+
"type": "com.twilio.voice.call.initiated",
167+
"version": 6,
168+
"subscription_sid": "DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
169+
"url": "https://events.twilio.com/v1/Subscriptions/DFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedEvents/com.twilio.voice.call.initiated"
170+
}
171+
'''
172+
))
173+
174+
actual = self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
175+
.subscribed_events("type").update(version=1)
176+
177+
self.assertIsNotNone(actual)
178+
179+
def test_delete_request(self):
180+
self.holodeck.mock(Response(500, ''))
181+
182+
with self.assertRaises(TwilioException):
183+
self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
184+
.subscribed_events("type").delete()
185+
186+
self.holodeck.assert_has_request(Request(
187+
'delete',
188+
'https://events.twilio.com/v1/Subscriptions/DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/SubscribedEvents/type',
189+
))
190+
191+
def test_delete_response(self):
192+
self.holodeck.mock(Response(
193+
204,
194+
None,
195+
))
196+
197+
actual = self.client.events.v1.subscriptions("DFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
198+
.subscribed_events("type").delete()
199+
200+
self.assertTrue(actual)

0 commit comments

Comments
 (0)