Correct fingerprint behavior

This commit is contained in:
David Cramer 2015-08-26 11:51:06 -07:00
parent 56d8cd4f7e
commit 6d0d0d5de0
3 changed files with 15 additions and 1 deletions

View File

@ -2,6 +2,7 @@ Version 5.6.0
-------------
* Content is no longer base64-encoded.
* ``fingerprint`` is now correctly supported.
Version 5.5.0

View File

@ -273,7 +273,7 @@ class Client(object):
def build_msg(self, event_type, data=None, date=None,
time_spent=None, extra=None, stack=None, public_key=None,
tags=None, **kwargs):
tags=None, fingerprint=None, **kwargs):
"""
Captures, processes and serializes an event into a dict object
@ -375,6 +375,9 @@ class Client(object):
if culprit:
data['culprit'] = culprit
if fingerprint:
data['fingerprint'] = fingerprint
# Run the data through processors
for processor in self.get_processors():
data.update(processor.process(data))

View File

@ -350,6 +350,16 @@ class ClientTest(TestCase):
assert 'stacktrace' not in event
self.assertTrue('timestamp' in event)
def test_fingerprint(self):
self.client.captureMessage(
message='test',
fingerprint=['{{ default }}', 'foobar'],
)
assert len(self.client.events) == 1
event = self.client.events.pop(0)
assert event['fingerprint'] == ['{{ default }}', 'foobar']
def test_context(self):
self.client.context.merge({
'tags': {'foo': 'bar'},