8000 Rename to VoiceGrant · devsec101/twilio-python@bb59738 · GitHub
[go: up one dir, main page]

Skip to content

Commit bb59738

Browse files
committed
Rename to VoiceGrant
1 parent 268dd5e commit bb59738

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/unit/jwt/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.jwt.access_token import AccessToken, ConversationsGrant, IpMessagingGrant, ProgrammableVoiceGrant
7+
from twilio.jwt.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/jwt/access_token.py

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

4949

50-
class ProgrammableVoiceGrant(object):
50+
class VoiceGrant(object):
5151
""" Grant to access Twilio Programmable Voice"""
5252
def __init__(self,
5353
outgoing_application_sid=None,
@@ -65,7 +65,7 @@ def __init__(self,
6565

6666
@property
6767
def key(self):
68-
return "programmable_voice"
68+
return "voice"
6969

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

0 commit comments

Comments
 (0)
0