def test_simple(self):
url = '/plugins/github/installations/webhook/'
response = self.client.post(
path=url,
data=INSTALLATION_EVENT_EXAMPLE,
content_type='application/json',
HTTP_X_GITHUB_EVENT='installation',
HTTP_X_HUB_SIGNATURE='sha1=348e46312df2901e8cb945616ee84ce30d9987c9',
HTTP_X_GITHUB_DELIVERY=six.text_type(uuid4())
)
assert response.status_code == 204
assert Integration.objects.filter(
provider='github_apps',
external_id=2,
name='octocat',
).exists()
评论列表
文章目录