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

Side by Side Diff: scripts/common/unittests/cros_chromite_test.py

Issue 1068263003: CrOS: Update public waterfall to auto-configure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Updated from comments. Created 5 years, 8 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python2.7 1 #!/usr/bin/env python2.7
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Unit test suite for common.cros_chromite.""" 6 """Unit test suite for common.cros_chromite."""
7 7
8 import test_env 8 import test_env
9 9
10 import base64 10 import base64
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 expectations = ( 117 expectations = (
118 ) 118 )
119 # Name-based: name => base, suffix, category 119 # Name-based: name => base, suffix, category
120 expectations = ( 120 expectations = (
121 # (With Board Type) 121 # (With Board Type)
122 ('pre-cq-launcher', 'priest', 'pre-cq-launcher', None, 'PRE_CQ_LAUNCHER'), 122 ('pre-cq-launcher', 'priest', 'pre-cq-launcher', None, 'PRE_CQ_LAUNCHER'),
123 # The canary board type should override the name-based inferences, 123 # The canary board type should override the name-based inferences,
124 # marking this board as a canary. 124 # marking this board as a canary.
125 ('odd-name-paladin', 'canary', 'odd-name-paladin', None, 'CANARY'), 125 ('odd-name-paladin', 'canary', 'odd-name-paladin', None, 'CANARY'),
126 126
127 ('my-board-asan', None, 'my-board', 'asan', 'ASAN'),
127 ('my-board-pre-cq', None, 'my-board', 'pre-cq', 'PRE_CQ'), 128 ('my-board-pre-cq', None, 'my-board', 'pre-cq', 'PRE_CQ'),
128 ('my-board-chrome-pfq', None, 'my-board', 'chrome-pfq', 'PFQ'), 129 ('my-board-chrome-pfq', None, 'my-board', 'chrome-pfq', 'PFQ'),
129 ('my-board-chromium-pfq', None, 'my-board', 'chromium-pfq', 'PFQ'), 130 ('my-board-chromium-pfq', None, 'my-board', 'chromium-pfq', 'PFQ'),
130 ('my-board-paladin', None, 'my-board', 'paladin', 'PALADIN'), 131 ('my-board-paladin', None, 'my-board', 'paladin', 'PALADIN'),
131 ('my-board-release', None, 'my-board', 'release', 'CANARY'), 132 ('my-board-release', None, 'my-board', 'release', 'CANARY'),
132 ('my-board-release-group', None, 'my-board', 'release-group', 'CANARY'), 133 ('my-board-release-group', None, 'my-board', 'release-group', 'CANARY'),
133 ('my-board-firmware', None, 'my-board', 'firmware', 'FIRMWARE'), 134 ('my-board-firmware', None, 'my-board', 'firmware', 'FIRMWARE'),
134 ('my-board-incremental', None, 'my-board', 'incremental', 'INCREMENTAL'), 135 ('my-board-incremental', None, 'my-board', 'incremental', 'INCREMENTAL'),
135 ('my-board-factory', None, 'my-board', 'factory', 'FACTORY'), 136 ('my-board-factory', None, 'my-board', 'factory', 'FACTORY'),
136 ('my-board-project-sdk', None, 'my-board-project', 'sdk', 'SDK'), 137 ('my-board-project-sdk', None, 'my-board-project', 'sdk', 'SDK'),
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 218
218 def testFetch_NotBase64(self): 219 def testFetch_NotBase64(self):
219 def _MockGetText(_url): 220 def _MockGetText(_url):
220 return 'Not Valid Base64' 221 return 'Not Valid Base64'
221 self.fetcher._GetText = _MockGetText 222 self.fetcher._GetText = _MockGetText
222 self.assertRaises(cros_chromite.GitilesError, self.fetcher, 'test', None) 223 self.assertRaises(cros_chromite.GitilesError, self.fetcher, 'test', None)
223 224
224 225
225 if __name__ == '__main__': 226 if __name__ == '__main__':
226 unittest.main() 227 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698