8000 Add programmable voice grant by jingming · Pull Request #279 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content

Add programmable voice grant #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 1, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change ProgrammableVoiceGrant to VoiceGrant
  • Loading branch information
jingming committed Aug 24, 2016
commit 376ab67bf1cd0a2ed45dcddc2996aa5e64f7d583
6 changes: 3 additions & 3 deletions tests/test_access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from datetime import datetime
from nose.tools import assert_equal
from twilio.jwt import decode
from twilio.access_token import AccessToken, ConversationsGrant, IpMessagingGrant, ProgrammableVoiceGrant
from twilio.access_token import AccessToken, ConversationsGrant, IpMessagingGrant, VoiceGrant

ACCOUNT_SID = 'AC123'
SIGNING_KEY_SID = 'SK123'
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_grants(self):
assert_equal({}, payload['grants']['ip_messaging'])

def test_programmable_voice_grant(self):
grant = ProgrammableVoiceGrant(
grant = VoiceGrant(
outgoing_application_sid='AP123',
outgoing_application_params={
'foo': 'bar'
Expand All @@ -129,4 +129,4 @@ def test_programmable_voice_grant(self):
'foo': 'bar'
}
}
}, payload['grants']['programmable_voice'])
}, payload['grants']['voice'])
4 changes: 2 additions & 2 deletions twilio/access_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def to_payload(self):
return grant


class ProgrammableVoiceGrant(object):
class VoiceGrant(object):
""" Grant to access Twilio Programmable Voice"""
def __init__(self,
outgoing_application_sid=None,
Expand All @@ -64,7 +64,7 @@ def __init__(self,

@property
def key(self):
return "programmable_voice"
return "voice"

def to_payload(self):
grant = {}
Expand Down
0