| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 def test_success(self): | 79 def test_success(self): |
| 80 """Assembles some ImagePairs into an ImagePairSet, and validates results. | 80 """Assembles some ImagePairs into an ImagePairSet, and validates results. |
| 81 """ | 81 """ |
| 82 image_pairs = [ | 82 image_pairs = [ |
| 83 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_1_AS_DICT), | 83 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_1_AS_DICT), |
| 84 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_2_AS_DICT), | 84 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_2_AS_DICT), |
| 85 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_3_AS_DICT), | 85 MockImagePair(base_url=BASE_URL_1, dict_to_return=IMAGEPAIR_3_AS_DICT), |
| 86 ] | 86 ] |
| 87 expected_imageset_dict = { | 87 expected_imageset_dict = { |
| 88 'columnHeaders': { | 88 'extraColumnHeaders': { |
| 89 'builder': { | 89 'builder': { |
| 90 'headerText': 'builder', | 90 'headerText': 'builder', |
| 91 'isFilterable': True, | 91 'isFilterable': True, |
| 92 'isSortable': True, | 92 'isSortable': True, |
| 93 'valuesAndCounts': { | 93 'valuesAndCounts': { |
| 94 'MyBuilder': 3 | 94 'MyBuilder': 3 |
| 95 }, | 95 }, |
| 96 }, | 96 }, |
| 97 'test': { | 97 'test': { |
| 98 'headerText': 'which GM test', | 98 'headerText': 'which GM test', |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 return self._dict_to_return | 164 return self._dict_to_return |
| 165 | 165 |
| 166 | 166 |
| 167 def main(): | 167 def main(): |
| 168 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairSetTest) | 168 suite = unittest.TestLoader().loadTestsFromTestCase(ImagePairSetTest) |
| 169 unittest.TextTestRunner(verbosity=2).run(suite) | 169 unittest.TextTestRunner(verbosity=2).run(suite) |
| 170 | 170 |
| 171 | 171 |
| 172 if __name__ == '__main__': | 172 if __name__ == '__main__': |
| 173 main() | 173 main() |
| OLD | NEW |