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

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

Issue 2299883005: [Findit] Add findit_for_client to do analysis based on client_id (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/crash_config.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 import re 5 import re
6 6
7 from google.appengine.api import users 7 from google.appengine.api import users
8 8
9 from common.findit_testcase import FinditTestCase 9 from common.findit_testcase import FinditTestCase
10 from crash.type_enums import CrashClient
10 from model.crash.crash_config import CrashConfig 11 from model.crash.crash_config import CrashConfig
11 12
12 13
13 DUMMY_COMPILED_COMPONENT_PATTERNS = { 14 DUMMY_COMPILED_COMPONENT_PATTERNS = {
14 "path_function_component": [ 15 "path_function_component": [
15 [ 16 [
16 re.compile("src/comp1.*"), 17 re.compile("src/comp1.*"),
17 None, 18 None,
18 "Comp1>Dummy" 19 "Comp1>Dummy"
19 ], 20 ],
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 DUMMY_COMPILED_COMPONENT_PATTERNS) 90 DUMMY_COMPILED_COMPONENT_PATTERNS)
90 91
91 def testGetCompiledComponentClassifierSetting(self): 92 def testGetCompiledComponentClassifierSetting(self):
92 crash_config = CrashConfig.Get() 93 crash_config = CrashConfig.Get()
93 self.assertEqual(crash_config.component_classifier, 94 self.assertEqual(crash_config.component_classifier,
94 DUMMY_COMPONENT_PATTERNS) 95 DUMMY_COMPONENT_PATTERNS)
95 self._VerifyTwoCompiledComponentClassifierEqual( 96 self._VerifyTwoCompiledComponentClassifierEqual(
96 crash_config.compiled_component_classifier, 97 crash_config.compiled_component_classifier,
97 DUMMY_COMPILED_COMPONENT_PATTERNS) 98 DUMMY_COMPILED_COMPONENT_PATTERNS)
98 99
100 def testGetClientConfig(self):
101 crash_config = CrashConfig.Get()
102 self.assertIsNotNone(crash_config.GetClientConfig(CrashClient.FRACAS))
103 self.assertIsNone(crash_config.GetClientConfig('Unsupported_client'))
OLDNEW
« no previous file with comments | « appengine/findit/model/crash/crash_config.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698