Skip to content

Commit 5f77483

Browse files
author
Doug Black
committed
Release 6.4.1-alpha-1
1 parent 3c76284 commit 5f77483

File tree

192 files changed

+644
-1064
lines changed

Some content is hidden

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

192 files changed

+644
-1064
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: clean install analysis test test-install develop docs docs-install
22

33
venv:
4-
virtualenv venv
4+
virtualenv --python=python venv
55

66
install: venv
77
. venv/bin/activate; pip install .
@@ -42,5 +42,5 @@ build: test-install
4242
clean:
4343
rm -rf venv
4444

45-
deploy:
46-
. venv/bin/activate; python deploy.py
45+
nopyc:
46+
find . -name \*.pyc -delete

setup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# documentation: http://pypi.python.org/pypi/setuptools
1616
REQUIRES = ["requests >= 2.0.0", "six", "pytz", "PyJWT >= 1.4.2"]
1717

18-
if sys.version_info < (2, 6):
19-
REQUIRES.append('simplejson')
2018
if sys.version_info < (3, 0):
2119
REQUIRES.extend(["cryptography >= 1.3.4", "idna >= 2.0.0", "pyOpenSSL >= 0.14"])
2220
if sys.version_info >= (3, 0):
@@ -46,7 +44,6 @@
4644
"License :: OSI Approved :: MIT License",
4745
"Operating System :: OS Independent",
4846
"Programming Language :: Python",
49-
"Programming Language :: Python :: 2.6",
5047
"Programming Language :: Python :: 2.7",
5148
"Programming Language :: Python :: 3.3",
5249
"Programming Language :: Python :: 3.4",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_read_full_response(self):
4545
"iso_country": "US",
4646
"lata": "834",
4747
"latitude": "19.720000",
48+
"locality": "Hilo",
4849
"longitude": "-155.090000",
4950
"phone_number": "+18089251571",
5051
"postal_code": "96720",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_read_full_response(self):
4545
"iso_country": "NO",
4646
"lata": null,
4747
"latitude": null,
48+
"locality": null,
4849
"longitude": null,
4950
"phone_number": "+4759440374",
5051
"postal_code": null,

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_read_full_response(self):
4545
"iso_country": "US",
4646
"lata": null,
4747
"latitude": null,
48+
"locality": null,
4849
"longitude": null,
4950
"phone_number": "+18001000052",
5051
"postal_code": null,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def test_read_full_response(self):
4949
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
5050
"friendly_name": "(808) 925-5327",
5151
"phone_number": "+18089255327",
52+
"origin": "origin",
5253
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5354
"sms_application_sid": "",
5455
"sms_fallback_method": "POST",
@@ -149,6 +150,7 @@ def test_create_response(self):
149150
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
150151
"friendly_name": "(808) 925-5327",
151152
"phone_number": "+18089255327",
153+
"origin": "origin",
152154
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
153155
"sms_application_sid": "",
154156
"sms_fallback_method": "POST",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def test_read_full_response(self):
4949
"date_updated": "Tue, 08 Sep 2015 16:21:16 +0000",
5050
"friendly_name": "61429099450",
5151
"phone_number": "+61429099450",
52+
"origin": "origin",
5253
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5354
"sms_application_sid": "",
5455
"sms_fallback_method": "POST",
@@ -149,6 +150,7 @@ def test_create_response(self):
149150
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
150151
"friendly_name": "(808) 925-5327",
151152
"phone_number": "+18089255327",
153+
"origin": "origin",
152154
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
153155
"sms_application_sid": "",
154156
"sms_fallback_method": "POST",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def test_read_full_response(self):
4949
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
5050
"friendly_name": "(808) 925-5327",
5151
"phone_number": "+18089255327",
52+
"origin": "origin",
5253
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5354
"sms_application_sid": "",
5455
"sms_fallback_method": "POST",
@@ -149,6 +150,7 @@ def test_create_response(self):
149150
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
150151
"friendly_name": "(808) 925-5327",
151152
"phone_number": "+18089255327",
153+
"origin": "origin",
152154
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
153155
"sms_application_sid": "",
154156
"sms_fallback_method": "POST",

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_update_response(self):
4545
"emergency_status": "Inactive",
4646
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4747
"friendly_name": "(808) 925-5327",
48+
"origin": "origin",
4849
"phone_number": "+18089255327",
4950
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5051
"sms_application_sid": "",
@@ -102,6 +103,7 @@ def test_fetch_response(self):
102103
"emergency_status": "Active",
103104
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
104105
"friendly_name": "(808) 925-5327",
106+
"origin": "origin",
105107
"phone_number": "+18089255327",
106108
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
107109
"sms_application_sid": "",
@@ -186,6 +188,7 @@ def test_read_full_response(self):
186188
"emergency_status": "Active",
187189
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
188190
"friendly_name": "(808) 925-5327",
191+
"origin": "origin",
189192
"phone_number": "+18089255327",
190193
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
191194
"sms_application_sid": "",
@@ -280,6 +283,7 @@ def test_create_response(self):
280283
"emergency_status": "Active",
281284
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
282285
"friendly_name": "(808) 925-5327",
286+
"origin": "origin",
283287
"phone_number": "+18089255327",
284288
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
285289
"sms_application_sid": "",

tests/integration/notify/v1/service/test_notification.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def test_create_response(self):
5151
"fcm": null,
5252
"gcm": null,
5353
"sms": null,
54-
"facebook_messenger": null
54+
"facebook_messenger": null,
55+
"alexa": null
5556
}
5657
'''
5758
))

tests/integration/notify/v1/service/user/test_user_binding.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,39 @@ def test_create_response(self):
137137

138138
self.assertIsNotNone(actual)
139139

140+
def test_create_alexa_response(self):
141+
self.holodeck.mock(Response(
142+
201,
143+
'''
144+
{
145+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
146+
"address": "address",
147+
"binding_type": "binding_type",
148+
"credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
149+
"date_created": "2015-07-30T20:00:00Z",
150+
"date_updated": "2015-07-30T20:00:00Z",
151+
"endpoint": "endpoint",
152+
"identity": "identity",
153+
"links": {
154+
"user": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/identity"
155+
},
156+
"notification_protocol_version": "notification_protocol_version",
157+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
158+
"sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
159+
"tags": [
160+
"tag"
161+
],
162+
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/identity/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
163+
}
164+
'''
165+
))
166+
167+
actual = self.client.notify.v1.services(sid="ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
168+
.users(identity="NUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
169+
.bindings.create(binding_type="apn", address="address")
170+
171+
self.assertIsNotNone(actual)
172+
140173
def test_list_request(self):
141174
self.holodeck.mock(Response(500, ''))
142175

tests/integration/notify/v1/test_service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ def test_create_response(self):
4040
"fcm_credential_sid": null,
4141
"messaging_service_sid": null,
4242
"facebook_messenger_page_id": "4",
43+
"alexa_skill_id": null,
4344
"default_apn_notification_protocol_version": "3",
4445
"default_gcm_notification_protocol_version": "3",
4546
"default_fcm_notification_protocol_version": "3",
47+
"default_alexa_notification_protocol_version": "3",
4648
"log_enabled": true,
4749
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4850
"links": {
@@ -106,9 +108,11 @@ def test_fetch_response(self):
106108
"fcm_credential_sid": null,
107109
"messaging_service_sid": null,
108110
"facebook_messenger_page_id": "4",
111+
"alexa_skill_id": null,
109112
"default_apn_notification_protocol_version": "3",
110113
"default_gcm_notification_protocol_version": "3",
111114
"default_fcm_notification_protocol_version": "3",
115+
"default_alexa_notification_protocol_version": "3",
112116
"log_enabled": true,
113117
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
114118
"links": {
@@ -162,9 +166,11 @@ def test_read_full_response(self):
162166
"fcm_credential_sid": null,
163167
"messaging_service_sid": null,
164168
"facebook_messenger_page_id": "4",
169+
"alexa_skill_id": null,
165170
"default_apn_notification_protocol_version": "3",
166171
"default_gcm_notification_protocol_version": "3",
167172
"default_fcm_notification_protocol_version": "3",
173+
"default_alexa_notification_protocol_version": "3",
168174
"log_enabled": true,
169175
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
170176
"links": {
@@ -233,7 +239,9 @@ def test_update_response(self):
233239
"default_apn_notification_protocol_version": "3",
234240
"default_gcm_notification_protocol_version": "3",
235241
"default_fcm_notification_protocol_version": "3",
242+
"default_alexa_notification_protocol_version": "3",
236243
"messaging_service_sid": null,
244+
"alexa_skill_id": null,
237245
"facebook_messenger_page_id": "4",
238246
"log_enabled": true,
239247
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",

tests/integration/preview/hosted_numbers/test_hosted_number_order.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,11 @@ def test_create_request(self):
210210
self.holodeck.mock(Response(500, ''))
211211

212212
with self.assertRaises(TwilioException):
213-
self.client.preview.hosted_numbers.hosted_number_orders.create(address_sid="ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", phone_number="+987654321", type="local", iso_country="iso_country", sms_capability=True, email="email")
213+
self.client.preview.hosted_numbers.hosted_number_orders.create(address_sid="ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", phone_number="+987654321", iso_country="iso_country", sms_capability=True, email="email")
214214

215215
values = {
216216
'AddressSid': "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
217217
'PhoneNumber': "+987654321",
218-
'Type': "local",
219218
'IsoCountry': "iso_country",
220219
'SmsCapability': True,
221220
'Email': "email",
@@ -254,6 +253,6 @@ def test_create_response(self):
254253
'''
255254
))
256255

257-
actual = self.client.preview.hosted_numbers.hosted_number_orders.create(address_sid="ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", phone_number="+987654321", type="local", iso_country="iso_country", sms_capability=True, email="email")
256+
actual = self.client.preview.hosted_numbers.hosted_number_orders.create(address_sid="ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", phone_number="+987654321", iso_country="iso_country", sms_capability=True, email="email")
258257

259258
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)