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

Unified Diff: tools/telemetry/catapult_base/cloud_storage_unittest.py

Issue 1260083007: [Telemetry] Update cloud_storage to use telemetry/third_party/gsutilz/gsutil (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest Created 5 years, 5 months 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 | « tools/telemetry/catapult_base/cloud_storage.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/catapult_base/cloud_storage_unittest.py
diff --git a/tools/telemetry/catapult_base/cloud_storage_unittest.py b/tools/telemetry/catapult_base/cloud_storage_unittest.py
index 780d94678a9cb1def6e23d813cfe2cf880a7e259..8d8a9a9dcf8ce0879160957e10c58455d47f9927 100644
--- a/tools/telemetry/catapult_base/cloud_storage_unittest.py
+++ b/tools/telemetry/catapult_base/cloud_storage_unittest.py
@@ -9,9 +9,6 @@ from catapult_base import cloud_storage
from telemetry.testing import system_stub
-def _FakeFindGsutil():
- return 'fake gsutil path'
-
def _FakeReadHash(_):
return 'hashthis!'
@@ -32,8 +29,6 @@ class CloudStorageUnitTest(unittest.TestCase):
def _assertRunCommandRaisesError(self, communicate_strs, error):
stubs = system_stub.Override(cloud_storage, ['open', 'subprocess'])
- orig_find_gs_util = cloud_storage.FindGsutil
- cloud_storage.FindGsutil = _FakeFindGsutil
stubs.open.files = {'fake gsutil path':''}
stubs.subprocess.Popen.returncode_result = 1
try:
@@ -42,7 +37,6 @@ class CloudStorageUnitTest(unittest.TestCase):
self.assertRaises(error, cloud_storage._RunCommand, [])
finally:
stubs.Restore()
- cloud_storage.FindGsutil = orig_find_gs_util
def testRunCommandCredentialsError(self):
strs = ['You are attempting to access protected data with no configured',
@@ -82,22 +76,18 @@ class CloudStorageUnitTest(unittest.TestCase):
def testExistsReturnsFalse(self):
stubs = system_stub.Override(cloud_storage, ['subprocess'])
- orig_find_gs_util = cloud_storage.FindGsutil
try:
stubs.subprocess.Popen.communicate_result = (
'',
'CommandException: One or more URLs matched no objects.\n')
stubs.subprocess.Popen.returncode_result = 1
- cloud_storage.FindGsutil = _FakeFindGsutil
self.assertFalse(cloud_storage.Exists('fake bucket',
'fake remote path'))
finally:
stubs.Restore()
- cloud_storage.FindGsutil = orig_find_gs_util
def testGetIfChanged(self):
stubs = system_stub.Override(cloud_storage, ['os', 'open'])
- stubs.open.files[_FakeFindGsutil()] = ''
orig_get = cloud_storage.Get
orig_read_hash = cloud_storage.ReadHash
orig_calculate_hash = cloud_storage.CalculateHash
« no previous file with comments | « tools/telemetry/catapult_base/cloud_storage.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698