Skip to content

Commit

Permalink
Release 6.4.1-alpha-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Black committed Jun 16, 2017
1 parent 3c76284 commit 5f77483
Show file tree
Hide file tree
Showing 192 changed files with 644 additions and 1,064 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: clean install analysis test test-install develop docs docs-install

venv:
virtualenv venv
virtualenv --python=python venv

install: venv
. venv/bin/activate; pip install .
Expand Down Expand Up @@ -42,5 +42,5 @@ build: test-install
clean:
rm -rf venv

deploy:
. venv/bin/activate; python deploy.py
nopyc:
find . -name \*.pyc -delete
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# documentation: http://pypi.python.org/pypi/setuptools
REQUIRES = ["requests >= 2.0.0", "six", "pytz", "PyJWT >= 1.4.2"]

if sys.version_info < (2, 6):
REQUIRES.append('simplejson')
if sys.version_info < (3, 0):
REQUIRES.extend(["cryptography >= 1.3.4", "idna >= 2.0.0", "pyOpenSSL >= 0.14"])
if sys.version_info >= (3, 0):
Expand Down Expand Up @@ -46,7 +44,6 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def test_read_full_response(self):
"iso_country": "US",
"lata": "834",
"latitude": "19.720000",
"locality": "Hilo",
"longitude": "-155.090000",
"phone_number": "+18089251571",
"postal_code": "96720",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def test_read_full_response(self):
"iso_country": "NO",
"lata": null,
"latitude": null,
"locality": null,
"longitude": null,
"phone_number": "+4759440374",
"postal_code": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def test_read_full_response(self):
"iso_country": "US",
"lata": null,
"latitude": null,
"locality": null,
"longitude": null,
"phone_number": "+18001000052",
"postal_code": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_read_full_response(self):
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
"friendly_name": "(808) 925-5327",
"phone_number": "+18089255327",
"origin": "origin",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
"sms_fallback_method": "POST",
Expand Down Expand Up @@ -149,6 +150,7 @@ def test_create_response(self):
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
"friendly_name": "(808) 925-5327",
"phone_number": "+18089255327",
"origin": "origin",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
"sms_fallback_method": "POST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_read_full_response(self):
"date_updated": "Tue, 08 Sep 2015 16:21:16 +0000",
"friendly_name": "61429099450",
"phone_number": "+61429099450",
"origin": "origin",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
"sms_fallback_method": "POST",
Expand Down Expand Up @@ -149,6 +150,7 @@ def test_create_response(self):
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
"friendly_name": "(808) 925-5327",
"phone_number": "+18089255327",
"origin": "origin",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
"sms_fallback_method": "POST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_read_full_response(self):
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
"friendly_name": "(808) 925-5327",
"phone_number": "+18089255327",
"origin": "origin",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
"sms_fallback_method": "POST",
Expand Down Expand Up @@ -149,6 +150,7 @@ def test_create_response(self):
"date_updated": "Thu, 30 Jul 2015 23:19:04 +0000",
"friendly_name": "(808) 925-5327",
"phone_number": "+18089255327",
"origin": "origin",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
"sms_fallback_method": "POST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def test_update_response(self):
"emergency_status": "Inactive",
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"friendly_name": "(808) 925-5327",
"origin": "origin",
"phone_number": "+18089255327",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
Expand Down Expand Up @@ -102,6 +103,7 @@ def test_fetch_response(self):
"emergency_status": "Active",
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"friendly_name": "(808) 925-5327",
"origin": "origin",
"phone_number": "+18089255327",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
Expand Down Expand Up @@ -186,6 +188,7 @@ def test_read_full_response(self):
"emergency_status": "Active",
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"friendly_name": "(808) 925-5327",
"origin": "origin",
"phone_number": "+18089255327",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
Expand Down Expand Up @@ -280,6 +283,7 @@ def test_create_response(self):
"emergency_status": "Active",
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"friendly_name": "(808) 925-5327",
"origin": "origin",
"phone_number": "+18089255327",
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sms_application_sid": "",
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/notify/v1/service/test_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def test_create_response(self):
"fcm": null,
"gcm": null,
"sms": null,
"facebook_messenger": null
"facebook_messenger": null,
"alexa": null
}
'''
))
Expand Down
33 changes: 33 additions & 0 deletions tests/integration/notify/v1/service/user/test_user_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,39 @@ def test_create_response(self):

self.assertIsNotNone(actual)

def test_create_alexa_response(self):
self.holodeck.mock(Response(
201,
'''
{
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"address": "address",
"binding_type": "binding_type",
"credential_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"endpoint": "endpoint",
"identity": "identity",
"links": {
"user": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/identity"
},
"notification_protocol_version": "notification_protocol_version",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"tags": [
"tag"
],
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/identity/Bindings/BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
'''
))

actual = self.client.notify.v1.services(sid="ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.users(identity="NUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
.bindings.create(binding_type="apn", address="address")

self.assertIsNotNone(actual)

def test_list_request(self):
self.holodeck.mock(Response(500, ''))

Expand Down
8 changes: 8 additions & 0 deletions tests/integration/notify/v1/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ def test_create_response(self):
"fcm_credential_sid": null,
"messaging_service_sid": null,
"facebook_messenger_page_id": "4",
"alexa_skill_id": null,
"default_apn_notification_protocol_version": "3",
"default_gcm_notification_protocol_version": "3",
"default_fcm_notification_protocol_version": "3",
"default_alexa_notification_protocol_version": "3",
"log_enabled": true,
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
Expand Down Expand Up @@ -106,9 +108,11 @@ def test_fetch_response(self):
"fcm_credential_sid": null,
"messaging_service_sid": null,
"facebook_messenger_page_id": "4",
"alexa_skill_id": null,
"default_apn_notification_protocol_version": "3",
"default_gcm_notification_protocol_version": "3",
"default_fcm_notification_protocol_version": "3",
"default_alexa_notification_protocol_version": "3",
"log_enabled": true,
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
Expand Down Expand Up @@ -162,9 +166,11 @@ def test_read_full_response(self):
"fcm_credential_sid": null,
"messaging_service_sid": null,
"facebook_messenger_page_id": "4",
"alexa_skill_id": null,
"default_apn_notification_protocol_version": "3",
"default_gcm_notification_protocol_version": "3",
"default_fcm_notification_protocol_version": "3",
"default_alexa_notification_protocol_version": "3",
"log_enabled": true,
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"links": {
Expand Down Expand Up @@ -233,7 +239,9 @@ def test_update_response(self):
"default_apn_notification_protocol_version": "3",
"default_gcm_notification_protocol_version": "3",
"default_fcm_notification_protocol_version": "3",
"default_alexa_notification_protocol_version": "3",
"messaging_service_sid": null,
"alexa_skill_id": null,
"facebook_messenger_page_id": "4",
"log_enabled": true,
"url": "https://notify.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,11 @@ def test_create_request(self):
self.holodeck.mock(Response(500, ''))

with self.assertRaises(TwilioException):
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")
self.client.preview.hosted_numbers.hosted_number_orders.create(address_sid="ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", phone_number="+987654321", iso_country="iso_country", sms_capability=True, email="email")

values = {
'AddressSid': "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
'PhoneNumber': "+987654321",
'Type': "local",
'IsoCountry': "iso_country",
'SmsCapability': True,
'Email': "email",
Expand Down Expand Up @@ -254,6 +253,6 @@ def test_create_response(self):
'''
))

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")
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")

self.assertIsNotNone(actual)
Loading

0 comments on commit 5f77483

Please sign in to comment.