MCPcopy Index your code
hub / github.com/slackapi/python-slack-sdk / setUp

Method setUp

integration_tests/webhook/test_webhook.py:21–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

19
20class TestWebhook(unittest.TestCase):
21 def setUp(self):
22 if not hasattr(self, "channel_id"):
23 token = os.environ[SLACK_SDK_TEST_BOT_TOKEN]
24 channel_name = os.environ[SLACK_SDK_TEST_INCOMING_WEBHOOK_CHANNEL_NAME].replace("#", "")
25 client = WebClient(token=token)
26 self.channel_id = None
27 for resp in client.conversations_list(limit=1000):
28 for c in resp["channels"]:
29 if c["name"] == channel_name:
30 self.channel_id = c["id"]
31 break
32 if self.channel_id is not None:
33 break
34
35 def tearDown(self):
36 pass

Callers

nothing calls this directly

Calls 2

conversations_listMethod · 0.95
WebClientClass · 0.90

Tested by

no test coverage detected