Skip to content

Commit 029e977

Browse files
committed
[Librarian] Regenerated @ 9a8a940052b0cd64cc253c2a38cb6ae555a4d07b
1 parent a686e4b commit 029e977

File tree

344 files changed

+4530
-2023
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+4530
-2023
lines changed

CHANGES.md

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

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

6+
[2017-11-10] Version 6.8.4
7+
---------------------------
8+
**Accounts**
9+
- Add AWS credential type
10+
11+
**Preview**
12+
- Removed `iso_country` as required field for creating a HostedNumberOrder.
13+
14+
**Proxy**
15+
- Added new fields to Service: geo_match_level, number_selection_behavior, intercept_callback_url, out_of_session_callback_url
16+
17+
618
[2017-11-03] Version 6.8.3
719
---------------------------
820
**Api**
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# coding=utf-8
2+
"""
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 AwsTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.accounts.v1.credentials \
22+
.aws.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://accounts.twilio.com/v1/Credentials/AWS',
27+
))
28+
29+
def test_read_empty_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"credentials": [],
35+
"meta": {
36+
"first_page_url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0",
37+
"key": "credentials",
38+
"next_page_url": null,
39+
"page": 0,
40+
"page_size": 50,
41+
"previous_page_url": null,
42+
"url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0"
43+
}
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.accounts.v1.credentials \
49+
.aws.list()
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_read_full_response(self):
54+
self.holodeck.mock(Response(
55+
200,
56+
'''
57+
{
58+
"credentials": [
59+
{
60+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61+
"date_created": "2015-07-31T04:00:00Z",
62+
"date_updated": "2015-07-31T04:00:00Z",
63+
"friendly_name": "friendly_name",
64+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
65+
"url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
66+
}
67+
],
68+
"meta": {
69+
"first_page_url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0",
70+
"key": "credentials",
71+
"next_page_url": null,
72+
"page": 0,
73+
"page_size": 50,
74+
"previous_page_url": null,
75+
"url": "https://accounts.twilio.com/v1/Credentials/AWS?PageSize=50&Page=0"
76+
}
77+
}
78+
'''
79+
))
80+
81+
actual = self.client.accounts.v1.credentials \
82+
.aws.list()
83+
84+
self.assertIsNotNone(actual)
85+
86+
def test_create_request(self):
87+
self.holodeck.mock(Response(500, ''))
88+
89+
with self.assertRaises(TwilioException):
90+
self.client.accounts.v1.credentials \
91+
.aws.create(credentials="AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY")
92+
93+
values = {'Credentials': "AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"}
94+
95+
self.holodeck.assert_has_request(Request(
96+
'post',
97+
'https://accounts.twilio.com/v1/Credentials/AWS',
98+
data=values,
99+
))
100+
101+
def test_create_response(self):
102+
self.holodeck.mock(Response(
103+
201,
104+
'''
105+
{
106+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
107+
"date_created": "2015-07-31T04:00:00Z",
108+
"date_updated": "2015-07-31T04:00:00Z",
109+
"friendly_name": "friendly_name",
110+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
111+
"url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
112+
}
113+
'''
114+
))
115+
116+
actual = self.client.accounts.v1.credentials \
117+
.aws.create(credentials="AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY")
118+
119+
self.assertIsNotNone(actual)
120+
121+
def test_fetch_request(self):
122+
self.holodeck.mock(Response(500, ''))
123+
124+
with self.assertRaises(TwilioException):
125+
self.client.accounts.v1.credentials \
126+
.aws(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
127+
128+
self.holodeck.assert_has_request(Request(
129+
'get',
130+
'https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
131+
))
132+
133+
def test_fetch_response(self):
134+
self.holodeck.mock(Response(
135+
200,
136+
'''
137+
{
138+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
139+
"date_created": "2015-07-31T04:00:00Z",
140+
"date_updated": "2015-07-31T04:00:00Z",
141+
"friendly_name": "friendly_name",
142+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
143+
"url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
144+
}
145+
'''
146+
))
147+
148+
actual = self.client.accounts.v1.credentials \
149+
.aws(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
150+
151+
self.assertIsNotNone(actual)
152+
153+
def test_update_request(self):
154+
self.holodeck.mock(Response(500, ''))
155+
156+
with self.assertRaises(TwilioException):
157+
self.client.accounts.v1.credentials \
158+
.aws(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
159+
160+
self.holodeck.assert_has_request(Request(
161+
'post',
162+
'https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
163+
))
164+
165+
def test_update_response(self):
166+
self.holodeck.mock(Response(
167+
200,
168+
'''
169+
{
170+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
171+
"date_created": "2015-07-31T04:00:00Z",
172+
"date_updated": "2015-07-31T04:00:00Z",
173+
"friendly_name": "friendly_name",
174+
"sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
175+
"url": "https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
176+
}
177+
'''
178+
))
179+
180+
actual = self.client.accounts.v1.credentials \
181+
.aws(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
182+
183+
self.assertIsNotNone(actual)
184+
185+
def test_delete_request(self):
186+
self.holodeck.mock(Response(500, ''))
187+
188+
with self.assertRaises(TwilioException):
189+
self.client.accounts.v1.credentials \
190+
.aws(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
191+
192+
self.holodeck.assert_has_request(Request(
193+
'delete',
194+
'https://accounts.twilio.com/v1/Credentials/AWS/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
195+
))
196+
197+
def test_delete_response(self):
198+
self.holodeck.mock(Response(
199+
204,
200+
None,
201+
))
202+
203+
actual = self.client.accounts.v1.credentials \
204+
.aws(sid="CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").delete()
205+
206+
self.assertTrue(actual)

tests/integration/accounts/v1/credential/test_public_key.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def test_create_request(self):
9090
self.client.accounts.v1.credentials \
9191
.public_key.create(public_key="publickey")
9292

93-
values = {'PublicKey': "publickey",}
93+
values = {'PublicKey': "publickey"}
9494

9595
self.holodeck.assert_has_request(Request(
9696
'post',

tests/integration/api/v2010/account/call/test_feedback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_create_request(self):
2222
.calls(sid="CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
2323
.feedback().create(quality_score=1)
2424

25-
values = {'QualityScore': 1,}
25+
values = {'QualityScore': 1}
2626

2727
self.holodeck.assert_has_request(Request(
2828
'post',
@@ -99,7 +99,7 @@ def test_update_request(self):
9999
.calls(sid="CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
100100
.feedback().update(quality_score=1)
101101

102-
values = {'QualityScore': 1,}
102+
values = {'QualityScore': 1}
103103

104104
self.holodeck.assert_has_request(Request(
105105
'post',

tests/integration/api/v2010/account/conference/test_participant.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_create_request(self):
100100
.conferences(sid="CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
101101
.participants.create(from_="+987654321", to="+123456789")
102102

103-
values = {'From': "+987654321", 'To': "+123456789",}
103+
values = {'From': "+987654321", 'To': "+123456789"}
104104

105105
self.holodeck.assert_has_request(Request(
106106
'post',

tests/integration/api/v2010/account/incoming_phone_number/test_assigned_add_on.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def test_create_request(self):
144144
.incoming_phone_numbers(sid="PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
145145
.assigned_add_ons.create(installed_add_on_sid="XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
146146

147-
values = {'InstalledAddOnSid': "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",}
147+
values = {'InstalledAddOnSid': "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
148148

149149
self.holodeck.assert_has_request(Request(
150150
'post',

tests/integration/api/v2010/account/incoming_phone_number/test_local.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def test_create_request(self):
124124
.incoming_phone_numbers \
125125
.local.create(phone_number="+987654321")
126126

127-
values = {'PhoneNumber': "+987654321",}
127+
values = {'PhoneNumber': "+987654321"}
128128

129129
self.holodeck.assert_has_request(Request(
130130
'post',

tests/integration/api/v2010/account/incoming_phone_number/test_mobile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def test_create_request(self):
124124
.incoming_phone_numbers \
125125
.mobile.create(phone_number="+987654321")
126126

127-
values = {'PhoneNumber': "+987654321",}
127+
values = {'PhoneNumber': "+987654321"}
128128

129129
self.holodeck.assert_has_request(Request(
130130
'post',

tests/integration/api/v2010/account/incoming_phone_number/test_toll_free.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def test_create_request(self):
124124
.incoming_phone_numbers \
125125
.toll_free.create(phone_number="+987654321")
126126

127-
values = {'PhoneNumber': "+987654321",}
127+
values = {'PhoneNumber': "+987654321"}
128128

129129
self.holodeck.assert_has_request(Request(
130130
'post',

tests/integration/api/v2010/account/queue/test_member.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def test_update_request(self):
5555
.queues(sid="QUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
5656
.members(call_sid="CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update(url="https://example.com", method="GET")
5757

58-
values = {'Url': "https://example.com", 'Method': "GET",}
58+
values = {'Url': "https://example.com", 'Method': "GET"}
5959

6060
self.holodeck.assert_has_request(Request(
6161
'post',

0 commit comments

Comments
 (0)