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

Side by Side Diff: gm/rebaseline_server/imagepairset_test.py

Issue 270413002: rebaseline_server JSON: pass category values as values, not keys (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 7 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 | « gm/rebaseline_server/imagepairset.py ('k') | gm/rebaseline_server/results.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 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2014 Google Inc. 4 Copyright 2014 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 Test imagepairset.py 9 Test imagepairset.py
10 """ 10 """
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_1_AS_DICT), 84 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_1_AS_DICT),
85 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_2_AS_DICT), 85 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_2_AS_DICT),
86 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_3_AS_DICT), 86 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_3_AS_DICT),
87 ] 87 ]
88 expected_imageset_dict = { 88 expected_imageset_dict = {
89 'extraColumnHeaders': { 89 'extraColumnHeaders': {
90 'builder': { 90 'builder': {
91 'headerText': 'builder', 91 'headerText': 'builder',
92 'isFilterable': True, 92 'isFilterable': True,
93 'isSortable': True, 93 'isSortable': True,
94 'valuesAndCounts': { 94 'valuesAndCounts': [('MyBuilder', 3)],
95 'MyBuilder': 3
96 },
97 }, 95 },
98 'test': { 96 'test': {
99 'headerText': 'which GM test', 97 'headerText': 'which GM test',
100 'headerUrl': 'http://learn/about/gm/tests', 98 'headerUrl': 'http://learn/about/gm/tests',
101 'isFilterable': True, 99 'isFilterable': True,
102 'isSortable': False, 100 'isSortable': False,
103 }, 101 },
104 }, 102 },
105 'imagePairs': [ 103 'imagePairs': [
106 IMAGEPAIR_1_AS_DICT, 104 IMAGEPAIR_1_AS_DICT,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return self._dict_to_return 173 return self._dict_to_return
176 174
177 175
178 def main(): 176 def main():
179 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairSetTest) 177 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairSetTest)
180 unittest.TextTestRunner(verbosity=2).run(suite) 178 unittest.TextTestRunner(verbosity=2).run(suite)
181 179
182 180
183 if __name__ == '__main__': 181 if __name__ == '__main__':
184 main() 182 main()
OLDNEW
« no previous file with comments | « gm/rebaseline_server/imagepairset.py ('k') | gm/rebaseline_server/results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698