def test_get_composite_hash_uses_exception_if_present(self): interface = Stacktrace( frames=[{"context_line": "foo bar", "lineno": 1, "filename": "foo.py", "function": "bar"}] ) interface_exc = Exception(type="exception", value="bar") result = interface.get_composite_hash({"sentry.interfaces.Exception": interface_exc}) self.assertEquals(result[-1], "exception")
def test_get_composite_hash_uses_exception_value_if_no_type_or_stack(self): interface = Stacktrace(frames=[]) interface_exc = Exception(value='bar') result = interface.get_composite_hash({ 'sentry.interfaces.Exception': interface_exc, }) self.assertEquals(result[-1], 'bar')
def test_get_composite_hash_uses_exception_value_if_no_type_or_stack(self): interface = Stacktrace(frames=[]) interface_exc = Exception(value='bar') result = interface.get_composite_hash({ 'sentry.interfaces.Exception': interface_exc, }) self.assertEquals(result[-1], 'bar')
def test_get_composite_hash_uses_exception_if_present(self): interface = Stacktrace(frames=[{ 'context_line': 'foo bar', 'lineno': 1, 'filename': 'foo.py', 'function': 'bar' }]) interface_exc = Exception(type='exception', value='bar') result = interface.get_composite_hash({ 'sentry.interfaces.Exception': interface_exc, }) self.assertEquals(result[-1], 'exception')