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

Unified Diff: appengine/findit/model/crash/test/crash_analysis_test.py

Issue 2043973002: [Findit] Fracas crash triage dashboard (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: appengine/findit/model/crash/test/crash_analysis_test.py
diff --git a/appengine/findit/model/crash/test/crash_analysis_test.py b/appengine/findit/model/crash/test/crash_analysis_test.py
index 4792c88447c937ebf368502c9b02dfc922372eb6..40ddf49857524120dd819732469b45e43ac64360 100644
--- a/appengine/findit/model/crash/test/crash_analysis_test.py
+++ b/appengine/findit/model/crash/test/crash_analysis_test.py
@@ -9,6 +9,7 @@ import unittest
from model.crash.crash_analysis import CrashAnalysis
from model import analysis_status
from model import result_status
+from model import triage_status
class CrashAnalysisTest(unittest.TestCase):
@@ -67,3 +68,27 @@ class CrashAnalysisTest(unittest.TestCase):
self.assertIsNone(analysis.has_regression_range)
self.assertIsNone(analysis.found_suspects)
self.assertIsNone(analysis.solution)
+
+ def testResultCorrect(self):
+ analysis = CrashAnalysis()
+ result_properties = ['suspected_cls', 'suspected_project',
+ 'suspected_components', 'regression_range']
+
+ analysis.status = analysis_status.ERROR
+ for result_property in result_properties:
+ self.assertIsNone(analysis.ResultCorrect(result_property))
+
+ analysis.status = analysis_status.COMPLETED
+ for result_property in result_properties:
+ setattr(analysis, '%s_triage_status' % result_property,
+ triage_status.TRIAGED_CORRECT)
+ self.assertTrue(analysis.ResultCorrect(result_property))
+ setattr(analysis, '%s_triage_status' % result_property,
+ triage_status.TRIAGED_INCORRECT)
+ self.assertFalse(analysis.ResultCorrect(result_property))
+ setattr(analysis, '%s_triage_status' % result_property,
+ triage_status.TRIAGED)
+ self.assertIsNone(analysis.ResultCorrect(result_property))
+ setattr(analysis, '%s_triage_status' % result_property,
+ triage_status.UNTRIAGED)
+ self.assertIsNone(analysis.ResultCorrect(result_property))

Powered by Google App Engine
This is Rietveld 408576698