MCPcopy Create free account
hub / github.com/slackapi/python-slack-sdk / test_users

Method test_users

tests/slack_sdk/scim/test_client.py:18–45  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

16 cleanup_mock_web_api_server(self)
17
18 def test_users(self):
19 client = SCIMClient(base_url="http://localhost:8888/", token="xoxp-valid")
20 client.search_users(start_index=0, count=1)
21 client.read_user("U111")
22
23 now = str(time.time())[:10]
24 user = User(
25 user_name=f"user_{now}",
26 name=UserName(given_name="Kaz", family_name="Sera"),
27 emails=[UserEmail(value=f"seratch+{now}@example.com")],
28 schemas=["urn:scim:schemas:core:1.0"],
29 )
30 client.create_user(user)
31 # The mock server does not work for PATH requests
32 try:
33 client.patch_user("U111", partial_user=User(user_name="foo"))
34 except:
35 pass
36 user.id = "U111"
37 user.user_name = "updated"
38 try:
39 client.update_user(user)
40 except:
41 pass
42 try:
43 client.delete_user("U111")
44 except:
45 pass
46
47 def test_groups(self):
48 client = SCIMClient(base_url="http://localhost:8888/", token="xoxp-valid")

Callers

nothing calls this directly

Calls 10

search_usersMethod · 0.95
read_userMethod · 0.95
create_userMethod · 0.95
patch_userMethod · 0.95
update_userMethod · 0.95
delete_userMethod · 0.95
SCIMClientClass · 0.90
UserClass · 0.90
UserNameClass · 0.90
UserEmailClass · 0.90

Tested by

no test coverage detected