Commit 2911a382 authored by ricow@google.com's avatar ricow@google.com

Fix test expectations for download_from_google_storage_unittests.py

This does not seem to be run by the bots, otherwise they should be red

R=hinoka@google.com, iannucci@google.com
BUG=

Review URL: https://codereview.chromium.org/1188643008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295741 0039d316-1c4b-4281-b951-d872f2087c98
parent 2d81beb3
......@@ -23,7 +23,7 @@ import download_from_google_storage
# ../third_party/gsutil/gsutil
GSUTIL_DEFAULT_PATH = os.path.join(
os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
'third_party', 'gsutil', 'gsutil')
'gsutil.py')
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
......@@ -169,12 +169,11 @@ class DownloadTests(unittest.TestCase):
('check_call',
('ls', input_filename)),
('check_call',
('cp', '-q', input_filename, output_filename))]
('cp', input_filename, output_filename))]
if sys.platform != 'win32':
expected_calls.append(
('check_call',
('ls',
'-L',
('stat',
'gs://sometesturl/7871c8e24da15bad8b0be2c36edc9dc77e37727f')))
expected_output = [
'0> Downloading %s...' % output_filename]
......@@ -210,7 +209,7 @@ class DownloadTests(unittest.TestCase):
0, self.queue, False, self.base_url, self.gsutil,
stdout_queue, self.ret_codes, True)
expected_output = [
'0> File %s for %s does not exist, skipping.' % (
'0> Failed to fetch file %s for %s, skipping. [Err: ]' % (
input_filename, output_filename),
]
expected_calls = [
......@@ -218,7 +217,7 @@ class DownloadTests(unittest.TestCase):
('ls', input_filename))
]
expected_ret_codes = [
(1, 'File %s for %s does not exist.' % (
(1, 'Failed to fetch file %s for %s. [Err: ]' % (
input_filename, output_filename))
]
self.assertEqual(list(stdout_queue.queue), expected_output)
......@@ -248,13 +247,12 @@ class DownloadTests(unittest.TestCase):
('check_call',
('ls', input_filename)),
('check_call',
('cp', '-q', input_filename, output_filename))
('cp', input_filename, output_filename))
]
if sys.platform != 'win32':
expected_calls.append(
('check_call',
('ls',
'-L',
('stat',
'gs://sometesturl/7871c8e24da15bad8b0be2c36edc9dc77e37727f')))
self.assertEqual(self.gsutil.history, expected_calls)
self.assertEqual(code, 101)
......@@ -280,12 +278,11 @@ class DownloadTests(unittest.TestCase):
('check_call',
('ls', input_filename)),
('check_call',
('cp', '-q', input_filename, output_filename))]
('cp', input_filename, output_filename))]
if sys.platform != 'win32':
expected_calls.append(
('check_call',
('ls',
'-L',
('stat',
'gs://sometesturl/7871c8e24da15bad8b0be2c36edc9dc77e37727f')))
self.assertEqual(self.gsutil.history, expected_calls)
self.assertEqual(code, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment