def get_response(self, event, body): if isinstance(body, dict): body = json.dumps(body) signature = handlers.make_signature(body) return app.post('/webhook', body, {'X-Github-Event': event, 'X-Hub-Signature': signature})
def get_response(self, event, body): if isinstance(body, dict): body = json.dumps(body) signature = handlers.make_signature(body) return app.post('/webhook', body, { 'X-Github-Event': event, 'X-Hub-Signature': signature })
def test_webhook_bad_sig(self): body = json.dumps({'action': 'blah'}) signature = handlers.make_signature(body + 'foo') app.post('/webhook', body, { 'X-Github-Event': 'test', 'X-Hub-Signature': signature }, status=400)
def get_response(self, event, body): if isinstance(body, dict): body = json.dumps(body) signature = handlers.make_signature(body) resp = app.post('/webhook', body, {'X-Github-Event': event, 'X-Hub-Signature': signature}) for task in self.taskqueue.get_filtered_tasks(): deferred.run(task.payload) return resp
def get(self): """Receives the warmup request.""" self.response.headers['Content-Type'] = 'text/plain' handlers.make_signature('load the secret!') self.response.write('Warmup successful')
def test_webhook_bad_sig(self): body = json.dumps({'action': 'blah'}) signature = handlers.make_signature(body + 'foo') app.post('/webhook', body, {'X-Github-Event': 'test', 'X-Hub-Signature': signature}, status=400)