Skip to content

Commit bcb7692

Browse files
author
Doug Black
committed
Regenerate
1 parent 63be2d7 commit bcb7692

37 files changed

+7188
-72
lines changed

CHANGES.md

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ twilio-python Changelog
33

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

6+
[2018-05-24] Version 6.3.0-alpha-1
7+
----------------------------------
8+
9+
- Add HostedNumbers preview support.
10+
- Add Proxy preview support.
11+
- Add BulkExports preview support.
12+
613
[2017-05-22] Version 6.2.0-alpha-1
714
----------------------------------
815

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+
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+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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 DayTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.bulk_exports.exports(resource_type="resource_type") \
22+
.days.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://preview.twilio.com/BulkExports/Exports/resource_type/Days',
27+
))
28+
29+
def test_read_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"days": [
35+
{
36+
"day": "2017-05-01",
37+
"size": 1234,
38+
"resource_type": "Calls"
39+
}
40+
],
41+
"meta": {
42+
"key": "days",
43+
"page_size": 50,
44+
"url": "https://preview.twilio.com/BulkExports/Exports/Calls/Days?PageSize=50&Page=0",
45+
"page": 0,
46+
"first_page_url": "https://preview.twilio.com/BulkExports/Exports/Calls/Days?PageSize=50&Page=0",
47+
"previous_page_url": null,
48+
"next_page_url": null
49+
}
50+
}
51+
'''
52+
))
53+
54+
actual = self.client.preview.bulk_exports.exports(resource_type="resource_type") \
55+
.days.list()
56+
57+
self.assertIsNotNone(actual)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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 ExportTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.bulk_exports.exports(resource_type="resource_type").fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://preview.twilio.com/BulkExports/Exports/resource_type',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"resource_type": "Calls",
34+
"url": "https://preview.twilio.com/BulkExports/Exports/Calls",
35+
"links": {
36+
"days": "https://preview.twilio.com/BulkExports/Exports/Calls/Days"
37+
}
38+
}
39+
'''
40+
))
41+
42+
actual = self.client.preview.bulk_exports.exports(resource_type="resource_type").fetch()
43+
44+
self.assertIsNotNone(actual)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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 ExportConfigurationTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.bulk_exports.export_configuration(resource_type="resource_type").fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://preview.twilio.com/BulkExports/Exports/resource_type/Configuration',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"url": "https://preview.twilio.com/BulkExports/Exports/Calls/Configuration",
34+
"enabled": true,
35+
"webhook_url": "",
36+
"webhook_method": "",
37+
"resource_type": "Calls",
38+
"email": ""
39+
}
40+
'''
41+
))
42+
43+
actual = self.client.preview.bulk_exports.export_configuration(resource_type="resource_type").fetch()
44+
45+
self.assertIsNotNone(actual)
46+
47+
def test_update_request(self):
48+
self.holodeck.mock(Response(500, ''))
49+
50+
with self.assertRaises(TwilioException):
51+
self.client.preview.bulk_exports.export_configuration(resource_type="resource_type").update()
52+
53+
self.holodeck.assert_has_request(Request(
54+
'post',
55+
'https://preview.twilio.com/BulkExports/Exports/resource_type/Configuration',
56+
))
57+
58+
def test_update_response(self):
59+
self.holodeck.mock(Response(
60+
200,
61+
'''
62+
{
63+
"url": "https://preview.twilio.com/BulkExports/Exports/Calls/Configuration",
64+
"enabled": true,
65+
"email": "[email protected]",
66+
"webhook_url": "",
67+
"resource_type": "Calls",
68+
"webhook_method": ""
69+
}
70+
'''
71+
))
72+
73+
actual = self.client.preview.bulk_exports.export_configuration(resource_type="resource_type").update()
74+
75+
self.assertIsNotNone(actual)
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)