Correct fingerprint behavior
This commit is contained in:
parent
56d8cd4f7e
commit
6d0d0d5de0
1
CHANGES
1
CHANGES
|
@ -2,6 +2,7 @@ Version 5.6.0
|
|||
-------------
|
||||
|
||||
* Content is no longer base64-encoded.
|
||||
* ``fingerprint`` is now correctly supported.
|
||||
|
||||
|
||||
Version 5.5.0
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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'},
|
||||
|
|
Loading…
Reference in New Issue