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

Side by Side Diff: appengine/findit/handlers/monitor_alerts.py

Issue 2203643002: [Findit] Use new mock for unittests. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@0708-pipeline-refactor
Patch Set: Created 4 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
OLDNEW
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 json 5 import json
6 import logging 6 import logging
7 7
8 from common import constants 8 from common import constants
9 from common.base_handler import BaseHandler 9 from common.base_handler import BaseHandler
10 from common.base_handler import Permission 10 from common.base_handler import Permission
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 A logged-in admin could trigger a run by navigating to the url directly. 79 A logged-in admin could trigger a run by navigating to the url directly.
80 """ 80 """
81 81
82 PERMISSION_LEVEL = Permission.ADMIN 82 PERMISSION_LEVEL = Permission.ADMIN
83 83
84 HTTP_CLIENT = HttpClientAppengine() 84 HTTP_CLIENT = HttpClientAppengine()
85 85
86 def HandleGet(self): 86 def HandleGet(self):
87 build_failures = _GetLatestBuildFailures(self.HTTP_CLIENT) 87 build_failures = _GetLatestBuildFailures(self.HTTP_CLIENT)
88 88 print build_failures
lijeffrey 2016/08/02 21:37:09 remove this before committing
chanli 2016/08/02 23:10:32 Done.
89 for build_failure in build_failures: 89 for build_failure in build_failures:
90 build_failure_analysis_pipelines.ScheduleAnalysisIfNeeded( 90 build_failure_analysis_pipelines.ScheduleAnalysisIfNeeded(
91 build_failure['master_name'], 91 build_failure['master_name'],
92 build_failure['builder_name'], 92 build_failure['builder_name'],
93 build_failure['build_number'], 93 build_failure['build_number'],
94 failed_steps=build_failure['failed_steps'], 94 failed_steps=build_failure['failed_steps'],
95 force=False, 95 force=False,
96 queue_name=constants.WATERFALL_ANALYSIS_QUEUE) 96 queue_name=constants.WATERFALL_ANALYSIS_QUEUE)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698