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

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

Issue 2322133002: [Findit] Add cracas_crash_analysis (Closed)
Patch Set: Rebase. Created 4 years, 3 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/test/crash_analysis_test.py ('k') | no next file » | 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 from crash.test.crash_testcase import CrashTestCase 7 from crash.test.crash_testcase import CrashTestCase
8 from model import analysis_status 8 from model import analysis_status
9 from model import result_status 9 from model import result_status
10 from model.crash.fracas_crash_analysis import FracasCrashAnalysis 10 from model.crash.fracas_crash_analysis import FracasCrashAnalysis
11 11
12 12
13 class FracasCrashAnalysisTest(CrashTestCase): 13 class FracasCrashAnalysisTest(CrashTestCase):
14 14
15 def testDoNotUseIdentifiersToSetProperties(self): 15 def testDoNotUseIdentifiersToSetProperties(self):
16 crash_identifiers = { 16 crash_identifiers = {
17 'chrome_version': '1', 17 'chrome_version': '1',
18 'signature': 'signature/here', 18 'signature': 'signature/here',
19 'channel': 'canary', 19 'channel': 'canary',
20 'platform': 'win', 20 'platform': 'win',
21 'process_type': 'browser', 21 'process_type': 'browser',
22 } 22 }
23 FracasCrashAnalysis.Create(crash_identifiers).put() 23 FracasCrashAnalysis.Create(crash_identifiers).put()
24 analysis = FracasCrashAnalysis.Get(crash_identifiers) 24 analysis = FracasCrashAnalysis.Get(crash_identifiers)
25 self.assertIsNone(analysis.crashed_version) 25 self.assertIsNone(analysis.crashed_version)
26 self.assertIsNone(analysis.signature) 26 self.assertIsNone(analysis.signature)
27 self.assertIsNone(analysis.channel) 27 self.assertIsNone(analysis.channel)
28 self.assertIsNone(analysis.platform) 28 self.assertIsNone(analysis.platform)
29
30 def testFracasCrashAnalysisReset(self):
31 analysis = FracasCrashAnalysis()
32 analysis.historical_metadata = {}
33 analysis.Reset()
34 self.assertIsNone(analysis.channel)
35 self.assertIsNone(analysis.historical_metadata)
OLDNEW
« no previous file with comments | « appengine/findit/model/crash/test/crash_analysis_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698