Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 79d2d3c

Browse files
committed
Merge pull request google#10 from mitya57/master
Various fixes.
2 parents 9e1e6a7 + 0c49e80 commit 79d2d3c

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

samples/apps/emailsettings_pop_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def main():
131131
raise PopSettingsException('Invalid consumer credentials')
132132
elif e.status == 503:
133133
raise PopSettingsException('Server busy')
134-
else e.status == 500:
134+
elif e.status == 500:
135135
raise PopSettingsException('Internal server error')
136136
else:
137137
raise PopSettingsException('Unknown error')

src/gdata/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ def Get(self, uri, extra_headers=None, redirects_remaining=4,
10841084
return result_body
10851085
return entry
10861086
return feed
1087-
elif server_response.status == 302:
1087+
elif server_response.status in (301, 302):
10881088
if redirects_remaining > 0:
10891089
location = (server_response.getheader('Location')
10901090
or server_response.getheader('location'))

tests/module_test_runner.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def RunAllTests(self):
4141
It also sets any module variables which match the settings keys to the
4242
corresponding values in the settings member.
4343
"""
44-
runner = unittest.TextTestRunner()
44+
runner = unittest.TextTestRunner(verbosity=2)
4545
for module in self.modules:
4646
# Set any module variables according to the contents in the settings
4747
for setting, value in self.settings.iteritems():
@@ -53,5 +53,6 @@ def RunAllTests(self):
5353
pass
5454
# We have set all of the applicable settings for the module, now
5555
# run the tests.
56-
print '\nRunning all tests in module', module.__name__
57-
runner.run(unittest.defaultTestLoader.loadTestsFromModule(module))
56+
result = runner.run(unittest.defaultTestLoader.loadTestsFromModule(module))
57+
if not result.wasSuccessful():
58+
raise Exception('Tests failed!')

0 commit comments

Comments
 (0)