8000 Add .json to Tokens in enable_nts · sangsiri/twilio-python@a20892d · GitHub
[go: up one dir, main page]

Skip to content

Commit a20892d

Browse files
committed
Add .json to Tokens in enable_nts
1 parent be8fef1 commit a20892d

File tree

6 files changed

+5
-6
lines changed

6 files changed

+5
-6
lines changed

tests/conversations/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

tests/test_access_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ def test_enable_nts(self):
7171
payload = decode(token, 'secret')
7272
self._validate_claims(payload)
7373
assert_equal(1, len(payload['grants']))
74-
assert_equal('https://api.twilio.com/2010-04-01/Accounts/AC123/Tokens',
74+
assert_equal('https://api.twilio.com/2010-04-01/Accounts/AC123/Tokens.json',
7575
payload['grants'][0]['res'])
7676
assert_equal(['POST'], payload['grants'][0]['act'])

tests/test_make_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def test_make_request_basic_auth(self, mock_request, mock_response):
100100
'authorization': 'Basic {}'.format(
101101
base64.b64encode("{}:{}".format('AC123', 'AuthToken'))
102102
),
103-
'user-agent': 'Python-httplib2/0.8 (gzip)'
103+
'user-agent': ANY,
104104
}
105105
)
106106

twilio/access_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def add_endpoint_grant(self, endpoint, actions=None):
4747
return self.add_grant(resource, actions)
4848

4949
def enable_nts(self):
50-
return self.add_rest_grant('/Tokens', HTTP_POST)
50+
return self.add_rest_grant('/Tokens.json', HTTP_POST)
5151

5252
def to_jwt(self):
5353
now = int(time.time())
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

twilio/rest/resources/conversations/conversations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def delete_instance(self, sid):
1919

2020

2121
class Conversation(NextGenInstanceResource):
22-
"""A Conversation instance representing a call between two or more participants.
22+
"""A Conversation instance representing a call between two or more
23+
participants.
2324
2425
.. attribute:: sid
2526

0 commit comments

Comments
 (0)
0