Reduce the number of timezones under test.
OAuth was testing all timezones. This is overkill, and caused some of our tests to intermittently time out. This reduces the test timezone set to the GMT range, which should provide reasonable test coverage. Change-Id: I4f37edb37d64644fc1f14b0e97b75ac95d3b68df
This commit is contained in:
parent
3ba300387a
commit
ee7a86c03f
@ -504,6 +504,38 @@ class TestOAuthAccessToken(BaseOAuthTest):
|
||||
access tokens.
|
||||
"""
|
||||
|
||||
tested_timezones = [
|
||||
'Etc/GMT',
|
||||
'Etc/GMT+0',
|
||||
'Etc/GMT+1',
|
||||
'Etc/GMT+10',
|
||||
'Etc/GMT+11',
|
||||
'Etc/GMT+12',
|
||||
'Etc/GMT+2',
|
||||
'Etc/GMT+3',
|
||||
'Etc/GMT+4',
|
||||
'Etc/GMT+5',
|
||||
'Etc/GMT+6',
|
||||
'Etc/GMT+7',
|
||||
'Etc/GMT+8',
|
||||
'Etc/GMT+9',
|
||||
'Etc/GMT-0',
|
||||
'Etc/GMT-1',
|
||||
'Etc/GMT-10',
|
||||
'Etc/GMT-11',
|
||||
'Etc/GMT-12',
|
||||
'Etc/GMT-13',
|
||||
'Etc/GMT-14',
|
||||
'Etc/GMT-2',
|
||||
'Etc/GMT-3',
|
||||
'Etc/GMT-4',
|
||||
'Etc/GMT-5',
|
||||
'Etc/GMT-6',
|
||||
'Etc/GMT-7',
|
||||
'Etc/GMT-8',
|
||||
'Etc/GMT-9',
|
||||
]
|
||||
|
||||
def test_valid_access_request(self):
|
||||
"""This test ensures that the access token request may execute
|
||||
properly with a valid token.
|
||||
@ -577,7 +609,7 @@ class TestOAuthAccessToken(BaseOAuthTest):
|
||||
old_tz = os.environ['TZ']
|
||||
|
||||
# Convert now into every possible timezone out there :)
|
||||
for name in pytz.all_timezones:
|
||||
for name in self.tested_timezones:
|
||||
|
||||
# Override the 'default timezone' for the current runtime.
|
||||
os.environ['TZ'] = name
|
||||
@ -623,7 +655,7 @@ class TestOAuthAccessToken(BaseOAuthTest):
|
||||
old_tz = os.environ['TZ']
|
||||
|
||||
# Convert now into every possible timezone out there :)
|
||||
for name in pytz.all_timezones:
|
||||
for name in self.tested_timezones:
|
||||
|
||||
# Override the 'default timezone' for the current runtime.
|
||||
os.environ['TZ'] = name
|
||||
|
Loading…
x
Reference in New Issue
Block a user