Skip to content

Commit b246a12

Browse files
author
Gunjan Sharma
committed
Added test for RetrieveAllUserAliases and changed OAuth scopes for Apps
1 parent 27503b9 commit b246a12

3 files changed

Lines changed: 18 additions & 12 deletions

File tree

src/gdata/gauth.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@
104104
'lh2': ( # Picasa Web Albums API
105105
'http://picasaweb.google.com/data/',),
106106
'apps': ( # Google Apps Provisioning API
107-
'http://www.google.com/a/feeds/',
108-
'https://www.google.com/a/feeds/',
109-
'http://apps-apis.google.com/a/feeds/',
110-
'https://apps-apis.google.com/a/feeds/'),
107+
'https://apps-apis.google.com/a/feeds/user/',
108+
'https://apps-apis.google.com/a/feeds/policies/',
109+
'https://apps-apis.google.com/a/feeds/alias/',
110+
'https://apps-apis.google.com/a/feeds/groups/'),
111111
'weaver': ( # Health H9 Sandbox
112112
'https://www.google.com/h9/feeds/',),
113113
'wise': ( # Spreadsheets Data API

tests/gdata_tests/apps/live_client_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def testClientConfiguration(self):
5656
self.assertEqual('2.0', self.client.api_version)
5757
self.assertEqual('apps', self.client.auth_service)
5858
self.assertEqual(
59-
('http://www.google.com/a/feeds/',
60-
'https://www.google.com/a/feeds/',
61-
'http://apps-apis.google.com/a/feeds/',
62-
'https://apps-apis.google.com/a/feeds/'),
59+
('https://apps-apis.google.com/a/feeds/user/',
60+
'https://apps-apis.google.com/a/feeds/policies/',
61+
'https://apps-apis.google.com/a/feeds/alias/',
62+
'https://apps-apis.google.com/a/feeds/groups/'),
6363
self.client.auth_scopes)
6464
if conf.options.get_value('runlive') == 'true':
6565
self.assertEqual(self.client.domain,

tests/gdata_tests/apps/multidomain/live_client_test.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ def testClientConfiguration(self):
5656
self.assertEqual('2.0', self.client.api_version)
5757
self.assertEqual('apps', self.client.auth_service)
5858
self.assertEqual(
59-
('http://www.google.com/a/feeds/',
60-
'https://www.google.com/a/feeds/',
61-
'http://apps-apis.google.com/a/feeds/',
62-
'https://apps-apis.google.com/a/feeds/'), self.client.auth_scopes)
59+
('https://apps-apis.google.com/a/feeds/user/',
60+
'https://apps-apis.google.com/a/feeds/policies/',
61+
'https://apps-apis.google.com/a/feeds/alias/',
62+
'https://apps-apis.google.com/a/feeds/groups/'), self.client.auth_scopes)
6363
if conf.options.get_value('runlive') == 'true':
6464
self.assertEqual(self.client.domain, conf.options.get_value('appsdomain'))
6565
else:
@@ -145,6 +145,12 @@ def testCreateRetrieveUpdateDelete(self):
145145
fetched_alias = self.client.RetrieveAlias(alias)
146146
self.assertEquals(fetched_alias.user_email, new_email)
147147
self.assertEquals(fetched_alias.alias_email, alias)
148+
149+
fetched_aliases = self.client.RetrieveAllUserAliases(new_email)
150+
self.assertEquals(fetched_aliases.entry[0].user_email, new_email)
151+
self.assertEquals(fetched_aliases.entry[0].alias_email, email)
152+
self.assertEquals(fetched_aliases.entry[1].user_email, new_email)
153+
self.assertEquals(fetched_aliases.entry[1].alias_email, alias)
148154

149155
self.client.DeleteAlias(alias)
150156
self.client.DeleteUser(new_email)

0 commit comments

Comments
 (0)