Пример #1
0
 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")
Пример #2
0
 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')
Пример #3
0
 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')
Пример #4
0
 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')