Rename .uid -> .id everywhere
This commit is contained in:
@@ -11,15 +11,15 @@ def test_remove_from_and_add_to_group(client1, client2, group, catch_event):
|
||||
# Test both methods, while ensuring that the user gets added to the group
|
||||
try:
|
||||
with catch_event("on_person_removed") as x:
|
||||
client1.remove_user_from_group(client2.uid, group["id"])
|
||||
client1.remove_user_from_group(client2.id, group["id"])
|
||||
assert subset(
|
||||
x.res, removed_id=client2.uid, author_id=client1.uid, thread_id=group["id"]
|
||||
x.res, removed_id=client2.id, author_id=client1.id, thread_id=group["id"]
|
||||
)
|
||||
finally:
|
||||
with catch_event("on_people_added") as x:
|
||||
client1.add_users_to_group(client2.uid, group["id"])
|
||||
client1.add_users_to_group(client2.id, group["id"])
|
||||
assert subset(
|
||||
x.res, added_ids=[client2.uid], author_id=client1.uid, thread_id=group["id"]
|
||||
x.res, added_ids=[client2.id], author_id=client1.id, thread_id=group["id"]
|
||||
)
|
||||
|
||||
|
||||
@@ -27,15 +27,15 @@ def test_remove_from_and_add_admins_to_group(client1, client2, group, catch_even
|
||||
# Test both methods, while ensuring that the user gets added as group admin
|
||||
try:
|
||||
with catch_event("on_admin_removed") as x:
|
||||
client1.remove_group_admins(client2.uid, group["id"])
|
||||
client1.remove_group_admins(client2.id, group["id"])
|
||||
assert subset(
|
||||
x.res, removed_id=client2.uid, author_id=client1.uid, thread_id=group["id"]
|
||||
x.res, removed_id=client2.id, author_id=client1.id, thread_id=group["id"]
|
||||
)
|
||||
finally:
|
||||
with catch_event("on_admin_added") as x:
|
||||
client1.add_group_admins(client2.uid, group["id"])
|
||||
client1.add_group_admins(client2.id, group["id"])
|
||||
assert subset(
|
||||
x.res, added_id=client2.uid, author_id=client1.uid, thread_id=group["id"]
|
||||
x.res, added_id=client2.id, author_id=client1.id, thread_id=group["id"]
|
||||
)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ def test_change_title(client1, group, catch_event):
|
||||
client1.change_thread_title(title, group["id"], thread_type=ThreadType.GROUP)
|
||||
assert subset(
|
||||
x.res,
|
||||
author_id=client1.uid,
|
||||
author_id=client1.id,
|
||||
new_title=title,
|
||||
thread_id=group["id"],
|
||||
thread_type=ThreadType.GROUP,
|
||||
@@ -55,8 +55,8 @@ def test_change_title(client1, group, catch_event):
|
||||
def test_change_nickname(client, client_all, catch_event, compare):
|
||||
nickname = random_hex()
|
||||
with catch_event("on_nickname_change") as x:
|
||||
client.change_nickname(nickname, client_all.uid)
|
||||
assert compare(x, changed_for=client_all.uid, new_nickname=nickname)
|
||||
client.change_nickname(nickname, client_all.id)
|
||||
assert compare(x, changed_for=client_all.id, new_nickname=nickname)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@@ -83,7 +83,7 @@ def test_change_image_local(client1, group, catch_event):
|
||||
with catch_event("on_image_change") as x:
|
||||
image_id = client1.change_group_image_local(url, group["id"])
|
||||
assert subset(
|
||||
x.res, new_image=image_id, author_id=client1.uid, thread_id=group["id"]
|
||||
x.res, new_image=image_id, author_id=client1.id, thread_id=group["id"]
|
||||
)
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ def test_change_image_remote(client1, group, catch_event):
|
||||
with catch_event("on_image_change") as x:
|
||||
image_id = client1.change_group_image_remote(url, group["id"])
|
||||
assert subset(
|
||||
x.res, new_image=image_id, author_id=client1.uid, thread_id=group["id"]
|
||||
x.res, new_image=image_id, author_id=client1.id, thread_id=group["id"]
|
||||
)
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ def test_change_approval_mode(client1, group, catch_event, require_admin_approva
|
||||
assert subset(
|
||||
x.res,
|
||||
approval_mode=require_admin_approval,
|
||||
author_id=client1.uid,
|
||||
author_id=client1.id,
|
||||
thread_id=group["id"],
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user