コード例 #1
0
 def test_add_webhook(self, mock_new_webhook):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.add_webhook('New Webhook', 'webhook-url', 'webhook-key')
     mock_new_webhook.assert_called_with(1, 'New Webhook', 'webhook-url',
                                         'webhook-key')
コード例 #2
0
 def test_add_webhook(self, mock_new_webhook):
     rm = RequestMaker("/api/v1", "fakehost", "faketoken")
     project = Project(rm, id=1)
     project.add_webhook("New Webhook", "webhook-url", "webhook-key")
     mock_new_webhook.assert_called_with(1, "New Webhook", "webhook-url",
                                         "webhook-key")