Skip to content

Commit

Permalink
docs: update the eventwebhook sample data
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Harrison committed Sep 15, 2020
1 parent 6606e8d commit 0c139aa
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions test/test_eventwebhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@
class UnitTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.PUBLIC_KEY = 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEEDr2LjtURuePQzplybdC+u4CwrqDqBaWjcMMsTbhdbcwHBcepxo7yAQGhHPTnlvFYPAZFceEu/1FwCM/QmGUhA=='
cls.SIGNATURE = 'MEUCIQCtIHJeH93Y+qpYeWrySphQgpNGNr/U+UyUlBkU6n7RAwIgJTz2C+8a8xonZGi6BpSzoQsbVRamr2nlxFDWYNH2j/0='
cls.TIMESTAMP = '1588788367'
cls.PAYLOAD = json.dumps({
'event': 'test_event',
'category': 'example_payload',
'message_id': 'message_id',
}, sort_keys=True, separators=(',', ':'))
cls.PUBLIC_KEY = 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE83T4O/n84iotIvIW4mdBgQ/7dAfSmpqIM8kF9mN1flpVKS3GRqe62gw+2fNNRaINXvVpiglSI8eNEc6wEA3F+g=='
cls.SIGNATURE = 'MEUCIGHQVtGj+Y3LkG9fLcxf3qfI10QysgDWmMOVmxG0u6ZUAiEAyBiXDWzM+uOe5W0JuG+luQAbPIqHh89M15TluLtEZtM='
cls.TIMESTAMP = '1600112502'
cls.PAYLOAD = json.dumps(
[
{
'email': '[email protected]',
'event': 'dropped',
'reason': 'Bounced Address',
'sg_event_id': 'ZHJvcC0xMDk5NDkxOS1MUnpYbF9OSFN0T0doUTRrb2ZTbV9BLTA',
'sg_message_id': 'LRzXl_NHStOGhQ4kofSm_A.filterdrecv-p3mdw1-756b745b58-kmzbl-18-5F5FC76C-9.0',
'smtp-id': '<[email protected]>',
'timestamp': 1600112492,
}
], sort_keys=True, separators=(',', ':')
) + '\r\n' # Be sure to include the trailing carriage return and newline!

def test_verify_valid_signature(self):
ew = EventWebhook()
Expand Down

0 comments on commit 0c139aa

Please sign in to comment.