OLD | NEW |
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 Loading... |
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 Loading... |
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() |
OLD | NEW |