8000 Change ProgrammableVoiceGrant to VoiceGrant · PNPtutorials/twilio-python@376ab67 · GitHub
[go: up one dir, main page]

Skip to content

Commit 376ab67

Browse files
committed
Change ProgrammableVoiceGrant to VoiceGrant
1 parent 6bb14a7 commit 376ab67

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/test_access_token.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from datetime import datetime
55
from nose.tools import assert_equal
66
from twilio.jwt import decode
7-
from twilio.access_token import AccessToken, ConversationsGrant, IpMessagingGrant, ProgrammableVoiceGrant
7+
from twilio.access_token import AccessToken, ConversationsGrant, IpMessagingGrant, VoiceGrant
88

99
ACCOUNT_SID = 'AC123'
1010
SIGNING_KEY_SID = 'SK123'
@@ -107,7 +107,7 @@ def test_grants(self):
107107
assert_equal({}, payload['grants']['ip_messaging'])
108108

109109
def test_programmable_voice_grant(self):
110-
grant = ProgrammableVoiceGrant(
110+
grant = VoiceGrant(
111111
outgoing_application_sid='AP123',
112112
outgoing_application_params={
113113
'foo': 'bar'
@@ -129,4 +129,4 @@ def test_programmable_voice_grant(self):
129129
'foo': 'bar'
130130
}
131131
}
132-
}, payload['grants']['programmable_voice'])
132+
}, payload['grants']['voice'])

twilio/access_token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def to_payload(self):
4646
return grant
4747

4848

49-
class ProgrammableVoiceGrant(object):
49+
class VoiceGrant(object):
5050
""" Grant to access Twilio Programmable Voice"""
5151
def __init__(self,
5252
outgoing_application_sid=None,
@@ -64,7 +64,7 @@ def __init__(self,
6464

6565
@property
6666
def key(self):
67-
return "programmable_voice"
67+
return "voice"
6868

6969
def to_payload(self):
7070
grant = {}

0 commit comments

Comments
 (0)
0