| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import base64 | 5 import base64 |
| 6 import httplib2 | 6 import httplib2 |
| 7 import json | 7 import json |
| 8 import unittest | 8 import unittest |
| 9 | 9 |
| 10 import mock | 10 import mock |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 | 272 |
| 273 @mock.patch('apiclient.discovery.build', mock.MagicMock()) | 273 @mock.patch('apiclient.discovery.build', mock.MagicMock()) |
| 274 @mock.patch.object(utils, 'ServiceAccountHttp', mock.MagicMock()) | 274 @mock.patch.object(utils, 'ServiceAccountHttp', mock.MagicMock()) |
| 275 class StartBisectTest(testing_common.TestCase): | 275 class StartBisectTest(testing_common.TestCase): |
| 276 | 276 |
| 277 def setUp(self): | 277 def setUp(self): |
| 278 super(StartBisectTest, self).setUp() | 278 super(StartBisectTest, self).setUp() |
| 279 app = webapp2.WSGIApplication( | 279 app = webapp2.WSGIApplication( |
| 280 [('/start_try_job', start_try_job.StartBisectHandler)]) | 280 [('/start_try_job', start_try_job.StartBisectHandler)]) |
| 281 self.testapp = webtest.TestApp(app) | 281 self.testapp = webtest.TestApp(app) |
| 282 self.PatchDatastoreHooksRequest() | |
| 283 namespaced_stored_object.Set( | 282 namespaced_stored_object.Set( |
| 284 can_bisect.BISECT_BOT_MAP_KEY, | 283 can_bisect.BISECT_BOT_MAP_KEY, |
| 285 { | 284 { |
| 286 'ChromiumPerf': [ | 285 'ChromiumPerf': [ |
| 287 ('nexus4', 'android_nexus4_perf_bisect'), | 286 ('nexus4', 'android_nexus4_perf_bisect'), |
| 288 ('nexus7', 'android_nexus7_perf_bisect'), | 287 ('nexus7', 'android_nexus7_perf_bisect'), |
| 289 ('win8', 'win_8_perf_bisect'), | 288 ('win8', 'win_8_perf_bisect'), |
| 290 ('xp', 'win_xp_perf_bisect'), | 289 ('xp', 'win_xp_perf_bisect'), |
| 291 ('android', 'android_nexus7_perf_bisect'), | 290 ('android', 'android_nexus7_perf_bisect'), |
| 292 ('mac', 'mac_perf_bisect'), | 291 ('mac', 'mac_perf_bisect'), |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 testing_common.AddTests( | 944 testing_common.AddTests( |
| 946 ['M'], ['b'], | 945 ['M'], ['b'], |
| 947 {'benchmark': {'chart': {'tir_label': {'page': {}}}}}) | 946 {'benchmark': {'chart': {'tir_label': {'page': {}}}}}) |
| 948 self.assertEqual( | 947 self.assertEqual( |
| 949 'tir_label-chart/tir_label-chart', | 948 'tir_label-chart/tir_label-chart', |
| 950 start_try_job.GuessMetric('M/b/benchmark/chart/tir_label')) | 949 start_try_job.GuessMetric('M/b/benchmark/chart/tir_label')) |
| 951 | 950 |
| 952 | 951 |
| 953 if __name__ == '__main__': | 952 if __name__ == '__main__': |
| 954 unittest.main() | 953 unittest.main() |
| OLD | NEW |