|
@@ -3,8 +3,9 @@
|
|
from __future__ import absolute_import, print_function
|
|
from __future__ import absolute_import, print_function
|
|
|
|
|
|
import six
|
|
import six
|
|
|
|
+import pytest
|
|
|
|
|
|
-from sentry.grouping.enhancer import Enhancements
|
|
|
|
|
|
+from sentry.grouping.enhancer import Enhancements, InvalidEnhancerConfig
|
|
|
|
|
|
|
|
|
|
def dump_obj(obj):
|
|
def dump_obj(obj):
|
|
@@ -46,6 +47,11 @@ family:native max-frames=3
|
|
assert isinstance(dumped, six.string_types)
|
|
assert isinstance(dumped, six.string_types)
|
|
|
|
|
|
|
|
|
|
|
|
+def test_parsing_errors():
|
|
|
|
+ with pytest.raises(InvalidEnhancerConfig):
|
|
|
|
+ Enhancements.from_config_string("invalid.message:foo -> bar")
|
|
|
|
+
|
|
|
|
+
|
|
def test_basic_path_matching():
|
|
def test_basic_path_matching():
|
|
enhancement = Enhancements.from_config_string(
|
|
enhancement = Enhancements.from_config_string(
|
|
"""
|
|
"""
|