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

Side by Side Diff: appengine/findit/handlers/test/calculate_confidence_scores_test.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years 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 copy 5 import copy
6 import datetime 6 import datetime
7 import mock 7 import mock
8 8
9 import webapp2 9 import webapp2
10 10
11 from common.waterfall import failure_type 11 from common.waterfall import failure_type
12 from handlers import calculate_confidence_scores 12 from handlers import calculate_confidence_scores
13 from lib import time_util 13 from libs import time_util
14 from model import analysis_approach_type 14 from model import analysis_approach_type
15 from model import suspected_cl_status 15 from model import suspected_cl_status
16 from model.suspected_cl_confidence import ConfidenceInformation 16 from model.suspected_cl_confidence import ConfidenceInformation
17 from model.wf_suspected_cl import WfSuspectedCL 17 from model.wf_suspected_cl import WfSuspectedCL
18 from waterfall.test import wf_testcase 18 from waterfall.test import wf_testcase
19 19
20 20
21 APPROACH_MAP = { 21 APPROACH_MAP = {
22 0: [analysis_approach_type.HEURISTIC], 22 0: [analysis_approach_type.HEURISTIC],
23 1: [analysis_approach_type.TRY_JOB], 23 1: [analysis_approach_type.TRY_JOB],
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 self.assertEqual(EXPECTED_CONFIDENCE, confidence_object.compile_heuristic) 169 self.assertEqual(EXPECTED_CONFIDENCE, confidence_object.compile_heuristic)
170 170
171 @mock.patch.object(calculate_confidence_scores, '_SavesNewCLConfidence') 171 @mock.patch.object(calculate_confidence_scores, '_SavesNewCLConfidence')
172 def testHandleGet(self, mock_fn): 172 def testHandleGet(self, mock_fn):
173 173
174 mock_fn.return_value = None 174 mock_fn.return_value = None
175 175
176 self.mock_current_user(user_email='test@chromium.org', is_admin=True) 176 self.mock_current_user(user_email='test@chromium.org', is_admin=True)
177 response = self.test_app.get('/calculate-confidence-scores') 177 response = self.test_app.get('/calculate-confidence-scores')
178 self.assertEqual(200, response.status_int) 178 self.assertEqual(200, response.status_int)
OLDNEW
« no previous file with comments | « appengine/findit/handlers/list_analyses.py ('k') | appengine/findit/handlers/test/help_triage_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698