| OLD | NEW |
| 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 Loading... |
| 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')) |
| OLD | NEW |