Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (C) 2012 Google Inc. All rights reserved. | 1 # Copyright (C) 2012 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 92 self.assertEqual(set(fetched_urls), set(expected_fetched_urls)) | 92 self.assertEqual(set(fetched_urls), set(expected_fetched_urls)) |
| 93 | 93 |
| 94 expected_masters = { | 94 expected_masters = { |
| 95 'masters': [{ | 95 'masters': [{ |
| 96 'tests': { | 96 'tests': { |
| 97 'browser_tests': {'builders': ['WebKit Linux', 'WebKit M ac']}, | 97 'browser_tests': {'builders': ['WebKit Linux', 'WebKit M ac']}, |
| 98 'mini_installer_test': {'builders': ['WebKit Linux', 'We bKit Mac', 'WebKit Win']}, | 98 'mini_installer_test': {'builders': ['WebKit Linux', 'We bKit Mac', 'WebKit Win']}, |
| 99 'layout-tests': {'builders': ['WebKit Linux', 'WebKit Wi n']}}, | 99 'layout-tests': {'builders': ['WebKit Linux', 'WebKit Wi n']}}, |
| 100 'name': 'ChromiumWebkit', | 100 'name': 'ChromiumWebkit', |
| 101 'url_name': 'chromium.webkit', | 101 'url_name': 'chromium.webkit', |
| 102 'groups': ['@ToT Chromium'], | 102 'groups': ['@ToT Chromium', '@ToT Blink'], |
|
ojan
2014/08/15 00:26:19
Whoops. This was my fault. Thx for fixing. I reall
| |
| 103 }], | 103 }], |
| 104 "no_upload_test_types": buildershandler.TEST_STEPS_THAT_DO_NOT_U PLOAD_YET, | 104 "no_upload_test_types": buildershandler.TEST_STEPS_THAT_DO_NOT_U PLOAD_YET, |
| 105 } | 105 } |
| 106 expected_json = buildershandler.dump_json(expected_masters) | 106 expected_json = buildershandler.dump_json(expected_masters) |
| 107 | 107 |
| 108 self.assertEqual(buildbot_data, expected_json) | 108 self.assertEqual(buildbot_data, expected_json) |
| 109 finally: | 109 finally: |
| 110 buildershandler.fetch_json = old_fetch_json | 110 buildershandler.fetch_json = old_fetch_json |
| 111 | 111 |
| 112 def test_fetch_buildbot_data_failure(self): | 112 def test_fetch_buildbot_data_failure(self): |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 with self.assertRaises(buildershandler.FetchBuildersException): | 161 with self.assertRaises(buildershandler.FetchBuildersException): |
| 162 buildbot_data = buildershandler.fetch_buildbot_data([m['url_name '] for m in masters]) | 162 buildbot_data = buildershandler.fetch_buildbot_data([m['url_name '] for m in masters]) |
| 163 self.assertEqual(set(expected_fetched_urls), set(fetched_urls)) | 163 self.assertEqual(set(expected_fetched_urls), set(fetched_urls)) |
| 164 | 164 |
| 165 finally: | 165 finally: |
| 166 buildershandler.fetch_json = old_fetch_json | 166 buildershandler.fetch_json = old_fetch_json |
| 167 | 167 |
| 168 | 168 |
| 169 if __name__ == '__main__': | 169 if __name__ == '__main__': |
| 170 unittest.main() | 170 unittest.main() |
| OLD | NEW |