diff options
author | Pat Ferate <pferate@users.noreply.github.com> | 2016-07-06 12:45:49 -0700 |
---|---|---|
committer | Jon Wayne Parrott <jonwayne@google.com> | 2016-07-06 12:45:49 -0700 |
commit | f25b7abfafb8610b8434b023cc0a77eb8f4c0b67 (patch) | |
tree | 69ad92ae6aeabe0f09c45401035cb4f80cf0b68a /scripts | |
parent | 267bbc59caad625b3905eec29c040f61aab3b4f0 (diff) | |
download | oauth2client-f25b7abfafb8610b8434b023cc0a77eb8f4c0b67.tar.gz |
Use context manager for assertRaises (#537)
* Use context manager for assertRaises, fixes #536.
* Update usage of unittest to unittest2.
* Remove unneeded `if __name__ == '__main__':` clauses in test files.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/run_gce_system_tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/run_gce_system_tests.py b/scripts/run_gce_system_tests.py index aae8345..40c105e 100644 --- a/scripts/run_gce_system_tests.py +++ b/scripts/run_gce_system_tests.py @@ -13,7 +13,7 @@ # limitations under the License. import json -import unittest +import unittest2 import httplib2 from six.moves import http_client @@ -24,7 +24,7 @@ from oauth2client.client import GoogleCredentials from oauth2client.contrib.gce import AppAssertionCredentials -class TestComputeEngine(unittest.TestCase): +class TestComputeEngine(unittest2.TestCase): def test_application_default(self): default_creds = GoogleCredentials.get_application_default() @@ -53,4 +53,4 @@ class TestComputeEngine(unittest.TestCase): if __name__ == '__main__': - unittest.main() + unittest2.main() |