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

Side by Side Diff: appengine/findit/model/crash/test/crash_analysis_test.py

Issue 2067373002: [Findit] Add fracas analysis result feedback page for manual triage. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@only-dashboard
Patch Set: Merge branch 'only-dashboard' into dashboard Created 4 years, 6 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
« no previous file with comments | « appengine/findit/model/crash/crash_analysis.py ('k') | appengine/findit/model/triage_status.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 from datetime import datetime 5 from datetime import datetime
6 6
7 import unittest 7 import unittest
8 8
9 from model.crash.crash_analysis import CrashAnalysis 9 from model.crash.crash_analysis import CrashAnalysis
10 from model import analysis_status 10 from model import analysis_status
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 analysis.Reset() 62 analysis.Reset()
63 self.assertIsNone(analysis.pipeline_status_path) 63 self.assertIsNone(analysis.pipeline_status_path)
64 self.assertEqual(analysis_status.PENDING, analysis.status) 64 self.assertEqual(analysis_status.PENDING, analysis.status)
65 self.assertIsNone(analysis.requested_time) 65 self.assertIsNone(analysis.requested_time)
66 self.assertIsNone(analysis.started_time) 66 self.assertIsNone(analysis.started_time)
67 self.assertIsNone(analysis.findit_version) 67 self.assertIsNone(analysis.findit_version)
68 self.assertIsNone(analysis.has_regression_range) 68 self.assertIsNone(analysis.has_regression_range)
69 self.assertIsNone(analysis.found_suspects) 69 self.assertIsNone(analysis.found_suspects)
70 self.assertIsNone(analysis.solution) 70 self.assertIsNone(analysis.solution)
71 71
72 def testResultCorrect(self): 72 def testUpdate(self):
73 analysis = CrashAnalysis() 73 analysis = CrashAnalysis()
74 result_properties = ['suspected_cls', 'suspected_project', 74 update = {'note': 'this is a note. +2314>?'}
75 'suspected_components', 'regression_range'] 75 analysis.Update(update)
76 76 for key, value in update.iteritems():
77 analysis.status = analysis_status.ERROR 77 self.assertEqual(getattr(analysis, key), value)
78 for result_property in result_properties:
79 self.assertIsNone(analysis.ResultCorrect(result_property))
80
81 analysis.status = analysis_status.COMPLETED
82 for result_property in result_properties:
83 setattr(analysis, '%s_triage_status' % result_property,
84 triage_status.TRIAGED_CORRECT)
85 self.assertTrue(analysis.ResultCorrect(result_property))
86 setattr(analysis, '%s_triage_status' % result_property,
87 triage_status.TRIAGED_INCORRECT)
88 self.assertFalse(analysis.ResultCorrect(result_property))
89 setattr(analysis, '%s_triage_status' % result_property,
90 triage_status.TRIAGED_UNSURE)
91 self.assertIsNone(analysis.ResultCorrect(result_property))
92 setattr(analysis, '%s_triage_status' % result_property,
93 triage_status.UNTRIAGED)
94 self.assertIsNone(analysis.ResultCorrect(result_property))
OLDNEW
« no previous file with comments | « appengine/findit/model/crash/crash_analysis.py ('k') | appengine/findit/model/triage_status.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698