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

Side by Side Diff: appengine/findit/model/test/wf_analysis_test.py

Issue 1912483004: [Findit] Add failure type to dashboard. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: . Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 common.waterfall import failure_type 9 from common.waterfall import failure_type
10 from model.wf_analysis import WfAnalysis 10 from model.wf_analysis import WfAnalysis
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 def testFailureTypeForLegacyDataWithFailedCompileStep(self): 133 def testFailureTypeForLegacyDataWithFailedCompileStep(self):
134 analysis = WfAnalysis.Create('m', 'b', 123) 134 analysis = WfAnalysis.Create('m', 'b', 123)
135 analysis.result = {'failures': [{'step_name': 'compile'}]} 135 analysis.result = {'failures': [{'step_name': 'compile'}]}
136 self.assertEqual(failure_type.COMPILE, analysis.failure_type) 136 self.assertEqual(failure_type.COMPILE, analysis.failure_type)
137 137
138 def testFailureTypeForLegacyDataWithFailedTestStep(self): 138 def testFailureTypeForLegacyDataWithFailedTestStep(self):
139 analysis = WfAnalysis.Create('m', 'b', 123) 139 analysis = WfAnalysis.Create('m', 'b', 123)
140 analysis.result = {'failures': [{'step_name': 'browser_tests'}]} 140 analysis.result = {'failures': [{'step_name': 'browser_tests'}]}
141 self.assertEqual(failure_type.TEST, analysis.failure_type) 141 self.assertEqual(failure_type.TEST, analysis.failure_type)
142
143 def testFailureTypeStr(self):
144 analysis = WfAnalysis.Create('m', 'b', 123)
145 analysis.result = {'failures': [{'step_name': 'browser_tests'}]}
146 self.assertEqual('test', analysis.failure_type_str)
OLDNEW
« no previous file with comments | « appengine/findit/handlers/test/list_analyses_test.py ('k') | appengine/findit/model/wf_analysis.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698