test_webhooks.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:sentry-plugins 作者: getsentry 项目源码 文件源码
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()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号