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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py

Issue 2767233002: Expand git_cl and rebaseline_cl unit tests. (Closed)
Patch Set: fixup Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 unittest 5 import unittest
6 6
7 from webkitpy.common.host_mock import MockHost 7 from webkitpy.common.host_mock import MockHost
8 from webkitpy.common.net.buildbot import Build 8 from webkitpy.common.net.buildbot import Build
9 from webkitpy.common.net.git_cl import GitCL 9 from webkitpy.common.net.git_cl import GitCL
10 from webkitpy.common.system.executive_mock import MockExecutive 10 from webkitpy.common.system.executive_mock import MockExecutive
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 { 173 {
174 'builder_name': 'builder-c', 174 'builder_name': 'builder-c',
175 'status': 'COMPLETED', 175 'status': 'COMPLETED',
176 'result': 'SUCCESS', 176 'result': 'SUCCESS',
177 'url': 'http://build.chromium.org/p/master/builders/some-builder /builds/123', 177 'url': 'http://build.chromium.org/p/master/builders/some-builder /builds/123',
178 }, 178 },
179 ] 179 ]
180 self.assertEqual( 180 self.assertEqual(
181 git_cl.latest_try_jobs(['builder-a', 'builder-b']), 181 git_cl.latest_try_jobs(['builder-a', 'builder-b']),
182 [Build('builder-a'), Build('builder-b', 100)]) 182 [Build('builder-a'), Build('builder-b', 100)])
183
184 def test_latest_try_builds_failures(self):
185 git_cl = GitCL(MockHost())
186 git_cl.fetch_try_results = lambda: [
187 {
188 'builder_name': 'builder-a',
189 'status': 'COMPLETED',
190 'result': 'FAILURE',
191 'url': 'http://build.chromium.org/p/master/builders/some-builder /builds/100',
192 },
193 ]
194 self.assertEqual(
195 git_cl.latest_try_jobs(['builder-a', 'builder-b']),
196 [Build('builder-a', 100)])
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_cl_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698