8000 [Librarian] Regenerated @ 7f1fbab32b507c8f5be970b0e69c70a83cad58b7 · henfee/twilio-python@72836d6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 72836d6

Browse files
committed
[Librarian] Regenerated @ 7f1fbab32b507c8f5be970b0e69c70a83cad58b7
1 parent ba9de31 commit 72836d6

Some content is hidden

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

42 files changed

+4577
-36
lines changed

CHANGES.md

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

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

6+
[2018-09-20] Version 6.17.0
7+
----------------------------
8+
**Preview**
9+
- Add `Form` resource to Authy preview given a `form_type`
10+
- Add Authy initial api-definitions in the 4 main resources: Services, Entities, Factors, Challenges
11+
12+
**Pricing**
13+
- add voice_numbers resource (v2)
14+
15+
**Verify**
16+
- Move from preview to beta **(breaking change)**
17+
18+
619
[2018-08-31] Version 6.16.4
720
----------------------------
821
**Library**
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
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+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
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 EntityTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.entities.create(identity="identity")
23+
24+
values = {'Identity': "identity", }
25+
26+
self.holodeck.assert_has_request(Request(
27+
'post',
28+
'https://preview.twilio.com/Authy/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities',
29+
data=values,
30+
))
31+
32+
def test_create_response(self):
33+
self.holodeck.mock(Response(
34+
201,
35+
'''
36+
{
37+
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"identity": "ff483d1ff591898a9942916050d2ca3f",
39+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41+
"date_created": "2015-07-30T20:00:00Z",
42+
"date_updated": "2015-07-30T20:00:00Z",
43+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
44+
"links": {
45+
"factors": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors"
46+
}
47+
}
48+
'''
49+
))
50+
51+
actual = self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
52+
.entities.create(identity="identity")
53+
54+
self.assertIsNotNone(actual)
55+
56+
def test_list_request(self):
57+
self.holodeck.mock(Response(500, ''))
58+
59+
with self.assertRaises(TwilioException):
60+
self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
61+
.entities.list()
62+
63+
self.holodeck.assert_has_request(Request(
64+
'get',
65+
'https://preview.twilio.com/Authy/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities',
66+
))
67+
68+
def test_read_empty_response(self):
69+
self.holodeck.mock(Response(
70+
200,
71+
'''
72+
{
73+
"entities": [],
74+
"meta": {
75+
"page": 0,
76+
"page_size": 50,
77+
"first_page_url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
78+
"previous_page_url": null,
79+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
80+
"next_page_url": null,
81+
"key": "entities"
82+
}
83+
}
84+
'''
85+
))
86+
87+
actual = self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
88+
.entities.list()
89+
90+
self.assertIsNotNone(actual)
91+
92+
def test_read_full_response(self):
93+
self.holodeck.mock(Response(
94+
200,
95+
'''
96+
{
97+
"entities": [
98+
{
99+
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
100+
"identity": "ff483d1ff591898a9942916050d2ca3f",
101+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
102+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
103+
"date_created": "2015-07-30T20:00:00Z",
104+
"date_updated": "2015-07-30T20:00:00Z",
105+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
106+
"links": {
107+
"factors": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors"
108+
}
109+
}
110+
],
111+
"meta": {
112+
"page": 0,
113+
"page_size": 50,
114+
"first_page_url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
115+
"previous_page_url": null,
116+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities?PageSize=50&Page=0",
117+
"next_page_url": null,
118+
"key": "entities"
119+
}
120+
}
121+
'''
122+
))
123+
124+
actual = self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
125+
.entities.list()
126+
127+
self.assertIsNotNone(actual)
128+
129+
def test_fetch_request(self):
130+
self.holodeck.mock(Response(500, ''))
131+
132+
with self.assertRaises(TwilioException):
133+
self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
134+
.entities(identity="identity").fetch()
135+
136+
self.holodeck.assert_has_request(Request(
137+
'get',
138+
'https://preview.twilio.com/Authy/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity',
139+
))
140+
141+
def test_fetch_response(self):
142+
self.holodeck.mock(Response(
143+
200,
144+
'''
145+
{
146+
"sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
147+
"identity": "ff483d1ff591898a9942916050d2ca3f",
148+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
149+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
150+
"date_created": "2015-07-30T20:00:00Z",
151+
"date_updated": "2015-07-30T20:00:00Z",
152+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f",
153+
"links": {
154+
"factors": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors"
155+
}
156+
}
157+
'''
158+
))
159+
160+
actual = self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
161+
.entities(identity="identity").fetch()
162+
163+
self.assertIsNotNone(actual)
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
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 ServiceTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.authy.services.create(friendly_name="friendly_name")
22+
23+
values = {'FriendlyName': "friendly_name", }
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://preview.twilio.com/Authy/Services',
28+
data=values,
29+
))
30+
31+
def test_create_response(self):
32+
self.holodeck.mock(Response(
33+
201,
34+
'''
35+
{
36+
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"friendly_name": "friendly_name",
38+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39+
"date_created": "2015-07-30T20:00:00Z",
40+
"date_updated": "2015-07-30T20:00:00Z",
41+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaa 10000 aaaaaaaaaa",
42+
"links": {
43+
"entities": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
44+
}
45+
}
46+
'''
47+
))
48+
49+
actual = self.client.preview.authy.services.create(friendly_name="friendly_name")
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_fetch_request(self):
54+
self.holodeck.mock(Response(500, ''))
55+
56+
with self.assertRaises(TwilioException):
57+
self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
58+
59+
self.holodeck.assert_has_request(Request(
60+
'get',
61+
'https://preview.twilio.com/Authy/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
62+
))
63+
64+
def test_fetch_response(self):
65+
self.holodeck.mock(Response(
66+
200,
67+
'''
68+
{
69+
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
70+
"friendly_name": "friendly_name",
71+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72+
"date_created": "2015-07-30T20:00:00Z",
73+
"date_updated": "2015-07-30T20:00:00Z",
74+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
75+
"links": {
76+
"entities": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
77+
}
78+
}
79+
'''
80+
))
81+
82+
actual = self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
83+
84+
self.assertIsNotNone(actual)
85+
86+
def test_list_request(self):
87+
self.holodeck.mock(Response(500, ''))
88+
89+
with self.assertRaises(TwilioException):
90+
self.client.preview.authy.services.list()
91+
92+
self.holodeck.assert_has_request(Request(
93+
'get',
94+
'https://preview.twilio.com/Authy/Services',
95+
))
96+
97+
def test_read_empty_response(self):
98+
self.holodeck.mock(Response(
99+
200,
100+
'''
101+
{
102+
"services": [],
103+
"meta": {
104+
"page": 0,
105+
"page_size": 50,
106+
"first_page_url": "https://preview.twilio.com/Authy/Services?PageSize=50&Page=0",
107+
"previous_page_url": null,
108+
"url": "https://preview.twilio.com/Authy/Services?PageSize=50&Page=0",
109+
"next_page_url": null,
110+
"key": "services"
111+
}
112+
}
113+
'''
114+
))
115+
116+
actual = self.client.preview.authy.services.list()
117+
118+
self.assertIsNotNone(actual)
119+
120+
def test_read_full_response(self):
121+
self.holodeck.mock(Response(
122+
200,
123+
'''
124+
{
125+
"services": [
126+
{
127+
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
128+
"friendly_name": "friendly_name",
129+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
130+
"date_created": "2015-07-30T20:00:00Z",
131+
"date_updated": "2015-07-30T20:00:00Z",
132+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
133+
"links": {
134+
"entities": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
135+
}
136+
}
137+
],
138+
"meta": {
139+
"page": 0,
140+
"page_size": 50,
141+
"first_page_url": "https://preview.twilio.com/Authy/Services?PageSize=50&Page=0",
142+
"previous_page_url": null,
143+
"url": "https://preview.twilio.com/Authy/Services?PageSize=50&Page=0",
144+
"next_page_url": null,
145+
"key": "services"
146+
}
147+
}
148+
'''
149+
))
150+
151+
actual = self.client.preview.authy.services.list()
152+
153+
self.assertIsNotNone(actual)
154+
155+
def test_update_request(self):
156+
self.holodeck.mock(Response(500, ''))
157+
158+
with self.assertRaises(TwilioException):
159+
self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
160+
161+
self.holodeck.assert_has_request(Request(
162+
'post',
163+
'https://preview.twilio.com/Authy/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
164+
))
165+
166+
def test_update_response(self):
167+
self.holodeck.mock(Response(
168+
200,
169+
'''
170+
{
171+
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
172+
"friendly_name": "friendly_name",
173+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
174+
"date_created": "2015-07-30T20:00:00Z",
175+
"date_updated": "2015-07-30T20:00:00Z",
176+
"url": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177+
"links": {
178+
"entities": "https://preview.twilio.com/Authy/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
179+
}
180+
}
181+
'''
182+
))
183+
184+
actual = self.client.preview.authy.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
185+
186+
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+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+

0 commit comments

Comments
 (0)
0