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

Side by Side Diff: appengine/findit/handlers/flake/test/check_flake_test.py

Issue 2243673002: [Findit] Added algorithm to analysis (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: gclient sync 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 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 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 webapp2 5 import webapp2
6 6
7 from handlers.flake import check_flake 7 from handlers.flake import check_flake
8 from model.flake.master_flake_analysis import MasterFlakeAnalysis 8 from model.flake.master_flake_analysis import MasterFlakeAnalysis
9 from model import analysis_status 9 from model import analysis_status
10 from model.analysis_status import STATUS_TO_DESCRIPTION
10 from waterfall.test import wf_testcase 11 from waterfall.test import wf_testcase
11 12
12 13
13 class CheckFlakeTest(wf_testcase.WaterfallTestCase): 14 class CheckFlakeTest(wf_testcase.WaterfallTestCase):
14 app_module = webapp2.WSGIApplication([ 15 app_module = webapp2.WSGIApplication([
15 ('/waterfall/check-flake', check_flake.CheckFlake), 16 ('/waterfall/check-flake', check_flake.CheckFlake),
16 ], debug=True) 17 ], debug=True)
17 18
18 def _CreateAndSaveMasterFlakeAnalysis( 19 def _CreateAndSaveMasterFlakeAnalysis(
19 self, master_name, builder_name, build_number, 20 self, master_name, builder_name, build_number,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 response = self.test_app.get('/waterfall/check-flake', params={ 64 response = self.test_app.get('/waterfall/check-flake', params={
64 'master_name': master_name, 65 'master_name': master_name,
65 'builder_name': builder_name, 66 'builder_name': builder_name,
66 'build_number': build_number, 67 'build_number': build_number,
67 'step_name': step_name, 68 'step_name': step_name,
68 'test_name': test_name, 69 'test_name': test_name,
69 'format': 'json'}) 70 'format': 'json'})
70 71
71 self.assertEquals(200, response.status_int) 72 self.assertEquals(200, response.status_int)
72 expected_check_flake_result ={ 73 expected_check_flake_result ={
73 'success_rates': [[int(build_number), success_rate]] 74 'success_rates': [[int(build_number), success_rate]],
75 'analysis_status': STATUS_TO_DESCRIPTION.get(
76 master_flake_analysis.status),
77 'suspected_flake_build_number': None
74 } 78 }
75 self.assertEqual(expected_check_flake_result, response.json_body) 79 self.assertEqual(expected_check_flake_result, response.json_body)
OLDNEW
« no previous file with comments | « appengine/findit/handlers/flake/flake_dashboard.py ('k') | appengine/findit/model/base_analysis.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698