Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: tests/gsutil_test.py

Issue 809053002: gsutil: Use urllib2 instead of urllib. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Patch v3, update the tests Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gsutil.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gsutil_test.py
diff --git a/tests/gsutil_test.py b/tests/gsutil_test.py
index f81524320e4579c83fcda2729de99b6556e1e157..30648279d363408f5528f3f4cbb096fa027b3b5f 100755
--- a/tests/gsutil_test.py
+++ b/tests/gsutil_test.py
@@ -16,7 +16,7 @@ import base64
import tempfile
import json
import os
-import urllib
+import urllib2
# Add depot_tools to path
@@ -71,15 +71,15 @@ class GsutilUnitTests(unittest.TestCase):
def setUp(self):
self.fake = FakeCall()
self.tempdir = tempfile.mkdtemp()
- self.old_urlopen = getattr(urllib, 'urlopen')
+ self.old_urlopen = getattr(urllib2, 'urlopen')
self.old_call = getattr(gsutil, 'call')
- setattr(urllib, 'urlopen', self.fake)
+ setattr(urllib2, 'urlopen', self.fake)
setattr(gsutil, 'call', self.fake)
def tearDown(self):
self.assertEqual(self.fake.expectations, [])
shutil.rmtree(self.tempdir)
- setattr(urllib, 'urlopen', self.old_urlopen)
+ setattr(urllib2, 'urlopen', self.old_urlopen)
setattr(gsutil, 'call', self.old_call)
def test_download_gsutil(self):
« no previous file with comments | « gsutil.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698