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

Side by Side Diff: Tools/TestResultServer/handlers/buildershandler_unittest.py

Issue 475503005: Handle tries of results data in upload (fix _is_directory). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add a test, fix unrelated failing unittest Created 6 years, 4 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
« no previous file with comments | « no previous file | Tools/TestResultServer/model/jsonresults.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 # 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
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
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()
OLDNEW
« no previous file with comments | « no previous file | Tools/TestResultServer/model/jsonresults.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698