8000 PR Comments · robscc/twilio-python@f26d490 · GitHub
[go: up one dir, main page]

Skip to content

Commit f26d490

Browse files
committed
PR Comments
1 parent fed7324 commit f26d490

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

tests/unit/http/test_validation_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ def test_build_validation_payload_body_parsed(self):
5050

5151
def test_build_validation_payload_complex(self):
5252
self.request.body = 'foobar'
53-
self.request.url = self.request.url + '?WestCoast=BestCoast&EastCoast=LeastCoast'
53+
self.request.url = self.request.url + '?QueryParam=Value&OtherQueryParam=OtherValue'
5454

5555
validation_payload = self.client._build_validation_payload(self.request)
5656

5757
self.assertEqual('GET', validation_payload.method)
5858
self.assertEqual('/2010-04-01/Accounts/AC123/Messages', validation_payload.path)
5959
self.assertEqual(['authorization', 'host'], validation_payload.signed_headers)
6060
self.assertEqual('foobar', validation_payload.body)
61-
self.assertEqual('WestCoast=BestCoast&EastCoast=LeastCoast',
61+
self.assertEqual('QueryParam=Value&OtherQueryParam=OtherValue',
6262
validation_payload.query_string)
6363

6464
def test_get_host(self):

tests/unit/jwt/test_client_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def test_jwt_payload(self):
238238
'sub': 'AC123',
239239
}, jwt.payload)
240240
self.assertGreaterEqual(jwt.payload['exp'], time.time(), 'JWT exp is before now')
241-
self.assertLessEqual(jwt.payload['exp'], time.time() + 501, 'JWT exp is after now + 5mins')
241+
self.assertLessEqual(jwt.payload['exp'], time.time() + 301, 'JWT exp is after now + 5mins')
242242
self.assertDictEqual({
243243
'alg': 'RS256',
244244
'typ': 'JWT',

twilio/jwt/validation/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,3 @@ def _hash(self, input_str):
8686
input_str = input_str.encode('utf-8')
8787

8888
return sha256(input_str).hexdigest()
89-

0 commit comments

Comments
 (0)
0