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

Side by Side Diff: tools/telemetry/catapult_base/cloud_storage_unittest.py

Issue 1165273003: Move cloud_storage to catapult_base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import unittest 6 import unittest
7 7
8 from catapult_base import cloud_storage
8 from telemetry.unittest_util import system_stub 9 from telemetry.unittest_util import system_stub
9 from telemetry.util import cloud_storage
10 10
11 11
12 def _FakeFindGsutil(): 12 def _FakeFindGsutil():
13 return 'fake gsutil path' 13 return 'fake gsutil path'
14 14
15 def _FakeReadHash(_): 15 def _FakeReadHash(_):
16 return 'hashthis!' 16 return 'hashthis!'
17 17
18 def _FakeCalulateHashMatchesRead(_): 18 def _FakeCalulateHashMatchesRead(_):
19 return 'hashthis!' 19 return 'hashthis!'
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 orig_run_command = cloud_storage._RunCommand 156 orig_run_command = cloud_storage._RunCommand
157 def AssertCorrectRunCommandArgs(args): 157 def AssertCorrectRunCommandArgs(args):
158 self.assertEqual(expected_args, args) 158 self.assertEqual(expected_args, args)
159 cloud_storage._RunCommand = AssertCorrectRunCommandArgs 159 cloud_storage._RunCommand = AssertCorrectRunCommandArgs
160 expected_args = ['cp', 'gs://bucket1/remote_path1', 160 expected_args = ['cp', 'gs://bucket1/remote_path1',
161 'gs://bucket2/remote_path2'] 161 'gs://bucket2/remote_path2']
162 try: 162 try:
163 cloud_storage.Copy('bucket1', 'bucket2', 'remote_path1', 'remote_path2') 163 cloud_storage.Copy('bucket1', 'bucket2', 'remote_path1', 'remote_path2')
164 finally: 164 finally:
165 cloud_storage._RunCommand = orig_run_command 165 cloud_storage._RunCommand = orig_run_command
OLDNEW
« no previous file with comments | « tools/telemetry/catapult_base/cloud_storage.py ('k') | tools/telemetry/catapult_base/support_binaries.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698