def test_get_token_manual_token(self): # Given manual_token = 'manual_token_here' hook = SlackWebhookHook(webhook_token=manual_token) # When webhook_token = hook._get_token(manual_token, None) # Then self.assertEqual(webhook_token, manual_token)
def test_get_token_manual_token(self): # Given manual_token = 'manual_token_here' hook = SlackWebhookHook(webhook_token=manual_token) # When webhook_token = hook._get_token(manual_token, None) # Then self.assertEqual(webhook_token, manual_token)
def test_get_token_conn_id(self): # Given conn_id = 'slack-webhook-default' hook = SlackWebhookHook(http_conn_id=conn_id) expected_webhook_token = 'your_token_here' # When webhook_token = hook._get_token(None, conn_id) # Then self.assertEqual(webhook_token, expected_webhook_token)
def test_get_token_conn_id(self): # Given conn_id = 'slack-webhook-default' hook = SlackWebhookHook(http_conn_id=conn_id) expected_webhook_token = 'your_token_here' # When webhook_token = hook._get_token(None, conn_id) # Then self.assertEqual(webhook_token, expected_webhook_token)