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

Method setUp

integration_tests/web/test_admin_users.py:20–33  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

18 """Runs integration tests with real Slack API"""
19
20 def setUp(self):
21 self.logger = logging.getLogger(__name__)
22 self.org_admin_token = os.environ[SLACK_SDK_TEST_GRID_ORG_ADMIN_USER_TOKEN]
23 self.sync_client: WebClient = WebClient(token=self.org_admin_token)
24 self.async_client: AsyncWebClient = AsyncWebClient(token=self.org_admin_token)
25
26 self.team_id = os.environ[SLACK_SDK_TEST_GRID_TEAM_ID]
27 self.idp_usergroup_id = os.environ[SLACK_SDK_TEST_GRID_IDP_USERGROUP_ID]
28
29 if not hasattr(self, "channel_ids"):
30 team_admin_token = os.environ[SLACK_SDK_TEST_GRID_WORKSPACE_ADMIN_USER_TOKEN]
31 client = WebClient(token=team_admin_token)
32 convs = client.conversations_list(exclude_archived=True, limit=100)
33 self.channel_ids = [c["id"] for c in convs["channels"] if c["name"] == "general"]
34
35 def tearDown(self):
36 pass

Callers

nothing calls this directly

Calls 3

conversations_listMethod · 0.95
WebClientClass · 0.90
AsyncWebClientClass · 0.90

Tested by

no test coverage detected