mirror of
https://github.com/khornberg/octokit.py
synced 2026-05-17 00:06:59 +03:00
Test: Use string instead of json.dumps
json.dumps on Python 3.4 and 3.5 produces differnt signatures
This commit is contained in:
@@ -94,7 +94,7 @@ class TestWebhook(object):
|
||||
|
||||
def test_verify_ping_event(self):
|
||||
headers = {
|
||||
'X-Hub-Signature': 'sha1=02ad50e35622a4cf597de5fb86f4d59520f5adda',
|
||||
'X-Hub-Signature': 'sha1=76b55589eeb1d5609a01922fc9a52475cf746a5b',
|
||||
'X-GitHub-Event': 'ping',
|
||||
'X-GitHub-Delivery': '72d3162f-cc78-11e3-81ab-4c9367dc0958',
|
||||
'User-Agent': 'GitHub-Hookshot/',
|
||||
@@ -110,8 +110,10 @@ class TestWebhook(object):
|
||||
}
|
||||
}
|
||||
)
|
||||
payload = '{"hook": {"events": ["pull_request"], "app_id": 42, "id": 11, "active": true, "type": "App"}}'
|
||||
secret = 'secret'
|
||||
assert webhook.verify(headers, payload, secret, events=['*'], return_app_id=True) == 42
|
||||
app_id = webhook.verify(headers, payload, secret, events=['*'], return_app_id=True)
|
||||
assert app_id == 42
|
||||
|
||||
def test_can_request_app_id_be_returned_on_non_ping_events(self):
|
||||
headers = {
|
||||
|
||||
Reference in New Issue
Block a user