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

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

Issue 2507613002: In rebaseline-cl, don't check for local file existence. (Closed)
Patch Set: Created 4 years, 1 month 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 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 json 5 import json
6 import urllib2 6 import urllib2
7 7
8 from webkitpy.common.net.rietveld import Rietveld 8 from webkitpy.common.net.rietveld import Rietveld
9 from webkitpy.common.net.buildbot import Build 9 from webkitpy.common.net.buildbot import Build
10 from webkitpy.common.net.web_mock import MockWeb 10 from webkitpy.common.net.web_mock import MockWeb
(...skipping 30 matching lines...) Expand all
41 }, 41 },
42 { 42 {
43 'builder': 'bar-builder', 43 'builder': 'bar-builder',
44 'buildnumber': 60, 44 'buildnumber': 60,
45 'result': 0 45 'result': 0
46 }, 46 },
47 ], 47 ],
48 'files': { 48 'files': {
49 'some/path/foo.cc': {'status': 'M'}, 49 'some/path/foo.cc': {'status': 'M'},
50 'some/path/bar.html': {'status': 'M'}, 50 'some/path/bar.html': {'status': 'M'},
51 'some/path/deleted.html': {'status': 'D'},
51 } 52 }
52 }), 53 }),
53 'https://codereview.chromium.org/api/11113333': 'my non-JSON content s', 54 'https://codereview.chromium.org/api/11113333': 'my non-JSON content s',
54 }) 55 })
55 56
56 def test_latest_try_jobs(self): 57 def test_latest_try_jobs(self):
57 rietveld = Rietveld(self.mock_web()) 58 rietveld = Rietveld(self.mock_web())
58 self.assertEqual( 59 self.assertEqual(
59 rietveld.latest_try_jobs(11112222, ('bar-builder', 'other-builder')) , 60 rietveld.latest_try_jobs(11112222, ('bar-builder', 'other-builder')) ,
60 [Build('bar-builder', 60)]) 61 [Build('bar-builder', 60)])
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 rietveld = Rietveld(self.mock_web()) 110 rietveld = Rietveld(self.mock_web())
110 self.assertEqual( 111 self.assertEqual(
111 rietveld._filter_latest_builds([Build('foo', 3), Build('bar', 5), Bu ild('foo', 5)]), 112 rietveld._filter_latest_builds([Build('foo', 3), Build('bar', 5), Bu ild('foo', 5)]),
112 [Build('bar', 5), Build('foo', 5)]) 113 [Build('bar', 5), Build('foo', 5)])
113 114
114 def test_filter_latest_jobs_no_build_number(self): 115 def test_filter_latest_jobs_no_build_number(self):
115 rietveld = Rietveld(self.mock_web()) 116 rietveld = Rietveld(self.mock_web())
116 self.assertEqual( 117 self.assertEqual(
117 rietveld._filter_latest_builds([Build('foo', 3), Build('bar'), Build ('bar')]), 118 rietveld._filter_latest_builds([Build('foo', 3), Build('bar'), Build ('bar')]),
118 [Build('bar'), Build('foo', 3)]) 119 [Build('bar'), Build('foo', 3)])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698