diff options
author | Orest Bolohan <orest@google.com> | 2014-06-02 17:19:54 -0700 |
---|---|---|
committer | Orest Bolohan <orest@google.com> | 2014-06-02 17:19:54 -0700 |
commit | dff7414cb7926d1467fe7334b6d97febccd63637 (patch) | |
tree | 9388426635536b389f7748110c885f5b4debfac5 /tests/test_service_account.py | |
parent | 50bcae88b7366c1343524d177c1a7f40f8533f4a (diff) | |
download | oauth2client-dff7414cb7926d1467fe7334b6d97febccd63637.tar.gz |
Make OAuth2Crdentials.get_access_token() method return a
collections.namedtuple rather than a dictionary.
Diffstat (limited to 'tests/test_service_account.py')
-rw-r--r-- | tests/test_service_account.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_service_account.py b/tests/test_service_account.py index 20d5fdf..952483c 100644 --- a/tests/test_service_account.py +++ b/tests/test_service_account.py @@ -102,14 +102,14 @@ class ServiceAccountCredentialsTests(unittest.TestCase): ]) token = self.credentials.get_access_token(http=http) - self.assertEqual('first_token', token['access_token']) - self.assertEqual(1, token['expires_in']) + self.assertEqual('first_token', token.access_token) + self.assertEqual(1, token.expires_in) self.assertFalse(self.credentials.access_token_expired) self.assertEqual(token_response_first, self.credentials.token_response) token = self.credentials.get_access_token(http=http) - self.assertEqual('first_token', token['access_token']) - self.assertEqual(1, token['expires_in']) + self.assertEqual('first_token', token.access_token) + self.assertEqual(1, token.expires_in) self.assertFalse(self.credentials.access_token_expired) self.assertEqual(token_response_first, self.credentials.token_response) @@ -117,7 +117,7 @@ class ServiceAccountCredentialsTests(unittest.TestCase): self.assertTrue(self.credentials.access_token_expired) token = self.credentials.get_access_token(http=http) - self.assertEqual('second_token', token['access_token']) - self.assertEqual(1, token['expires_in']) + self.assertEqual('second_token', token.access_token) + self.assertEqual(1, token.expires_in) self.assertFalse(self.credentials.access_token_expired) self.assertEqual(token_response_second, self.credentials.token_response) |