From 3996bf2a4d0704e060520c30cf5901e4ae055b6a Mon Sep 17 00:00:00 2001 From: David Cramer Date: Thu, 9 Jun 2016 15:27:36 -0700 Subject: [PATCH] Add formatted attribute to message events --- raven/events.py | 1 + tests/transport/tests.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/raven/events.py b/raven/events.py index e3dc25d62..5398f83af 100644 --- a/raven/events.py +++ b/raven/events.py @@ -106,6 +106,7 @@ def capture(self, message, params=(), formatted=None, **kwargs): self.name: { 'message': message, 'params': self.transform(params), + 'formatted': formatted, }, } if 'message' not in data: diff --git a/tests/transport/tests.py b/tests/transport/tests.py index 3c5d57a0b..2a69cf0b2 100644 --- a/tests/transport/tests.py +++ b/tests/transport/tests.py @@ -77,7 +77,11 @@ def test_build_then_send(self): msg = c.build_msg('raven.events.Message', message='foo', date=d) expected = { 'project': '1', - 'sentry.interfaces.Message': {'message': 'foo', 'params': ()}, + 'sentry.interfaces.Message': { + 'message': 'foo', + 'params': (), + 'formatted': None, + }, 'server_name': 'test_server', 'level': 40, 'tags': {},