| OLD | NEW |
| 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 model.analysis_status import STATUS_TO_DESCRIPTION |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 'build_number': build_number, | 67 'build_number': build_number, |
| 68 'step_name': step_name, | 68 'step_name': step_name, |
| 69 'test_name': test_name, | 69 'test_name': test_name, |
| 70 'format': 'json'}) | 70 'format': 'json'}) |
| 71 | 71 |
| 72 self.assertEquals(200, response.status_int) | 72 self.assertEquals(200, response.status_int) |
| 73 expected_check_flake_result ={ | 73 expected_check_flake_result ={ |
| 74 'success_rates': [[int(build_number), success_rate]], | 74 'success_rates': [[int(build_number), success_rate]], |
| 75 'analysis_status': STATUS_TO_DESCRIPTION.get( | 75 'analysis_status': STATUS_TO_DESCRIPTION.get( |
| 76 master_flake_analysis.status), | 76 master_flake_analysis.status), |
| 77 'master_name': master_name, |
| 78 'builder_name': builder_name, |
| 79 'build_number': int(build_number), |
| 80 'step_name': step_name, |
| 81 'test_name': test_name, |
| 77 'suspected_flake_build_number': None | 82 'suspected_flake_build_number': None |
| 78 } | 83 } |
| 79 self.assertEqual(expected_check_flake_result, response.json_body) | 84 self.assertEqual(expected_check_flake_result, response.json_body) |
| OLD | NEW |