diff options
author | Craig Citro <craigcitro@gmail.com> | 2014-08-15 11:22:05 -0700 |
---|---|---|
committer | Craig Citro <craigcitro@gmail.com> | 2014-08-18 09:14:32 -0700 |
commit | 0cad2086584dba51119bd018e51080e9ea26a8d0 (patch) | |
tree | 27209f5f1ceda904fb6ee5f9d77d5a250193e4b3 /tests/test_service_account.py | |
parent | 0399a77a6a39c696841b1f16d85122d1a8c46552 (diff) | |
download | oauth2client-0cad2086584dba51119bd018e51080e9ea26a8d0.tar.gz |
Require python >= 2.6, use the json module.
* Set the minimum version of python to be 2.6, since we don't need to support
anything older anymore.
* As the first of a series of related cleanups, drop our custom json
module (since json is in the stdlib since 2.6).
Diffstat (limited to 'tests/test_service_account.py')
-rw-r--r-- | tests/test_service_account.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_service_account.py b/tests/test_service_account.py index 56313d3..3a7bd3c 100644 --- a/tests/test_service_account.py +++ b/tests/test_service_account.py @@ -20,13 +20,13 @@ Unit tests for service account credentials implemented using RSA. """ +import json import os import rsa import time import unittest from http_mock import HttpMockSequence -from oauth2client.anyjson import simplejson from oauth2client.service_account import _ServiceAccountCredentials @@ -98,13 +98,13 @@ class ServiceAccountCredentialsTests(unittest.TestCase): token_response_first = {'access_token': 'first_token', 'expires_in': S} token_response_second = {'access_token': 'second_token', 'expires_in': S} http = HttpMockSequence([ - ({'status': '200'}, simplejson.dumps(token_response_first)), - ({'status': '200'}, simplejson.dumps(token_response_second)), + ({'status': '200'}, json.dumps(token_response_first)), + ({'status': '200'}, json.dumps(token_response_second)), ]) token = self.credentials.get_access_token(http=http) self.assertEqual('first_token', token.access_token) - self.assertEqual(S - 1, token.expires_in) + self.assertEqual(S - 1, token.expires_in) self.assertFalse(self.credentials.access_token_expired) self.assertEqual(token_response_first, self.credentials.token_response) |