aboutsummaryrefslogtreecommitdiff
path: root/tests/test_jwt.py
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2014-08-20 12:19:06 +0900
committerINADA Naoki <inada-n@klab.com>2014-08-20 12:19:06 +0900
commitd09be0966bc650d40331ae208965f05cb4852277 (patch)
treeb862172ab3774f89744b189925a0b57e657af58c /tests/test_jwt.py
parent1668c60692395a726eaaddc0126b238506c5d116 (diff)
downloadoauth2client-d09be0966bc650d40331ae208965f05cb4852277.tar.gz
HttpMockSequence should return bytes as content.
Diffstat (limited to 'tests/test_jwt.py')
-rw-r--r--tests/test_jwt.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_jwt.py b/tests/test_jwt.py
index d3891b8..e42876c 100644
--- a/tests/test_jwt.py
+++ b/tests/test_jwt.py
@@ -212,8 +212,8 @@ class SignedJwtAssertionCredentialsTests(unittest.TestCase):
scope='read+write',
sub='joe@example.org')
http = HttpMockSequence([
- ({'status': '200'}, '{"access_token":"1/3w","expires_in":3600}'),
- ({'status': '200'}, 'echo_request_headers'),
+ ({'status': '200'}, b'{"access_token":"1/3w","expires_in":3600}'),
+ ({'status': '200'}, b'echo_request_headers'),
])
http = credentials.authorize(http)
_, content = http.request('http://example.org')
@@ -235,10 +235,10 @@ class SignedJwtAssertionCredentialsTests(unittest.TestCase):
def _credentials_refresh(self, credentials):
http = HttpMockSequence([
- ({'status': '200'}, '{"access_token":"1/3w","expires_in":3600}'),
- ({'status': '401'}, ''),
- ({'status': '200'}, '{"access_token":"3/3w","expires_in":3600}'),
- ({'status': '200'}, 'echo_request_headers'),
+ ({'status': '200'}, b'{"access_token":"1/3w","expires_in":3600}'),
+ ({'status': '401'}, b''),
+ ({'status': '200'}, b'{"access_token":"3/3w","expires_in":3600}'),
+ ({'status': '200'}, b'echo_request_headers'),
])
http = credentials.authorize(http)
_, content = http.request('http://example.org')