Use snake_case method names
Renamed: - Message.formatMentions - _util.digitToChar - _util.generateMessageID - _util.getSignatureID - _util.generateOfflineThreadingID - Client._markAlive Renamed following Client methods: - isLoggedIn - getSession - setSession - _forcedFetch - fetchThreads - fetchAllUsersFromThreads - fetchAllUsers - searchForUsers - searchForPages - searchForGroups - searchForThreads - searchForMessageIDs - searchForMessages - _fetchInfo - fetchUserInfo - fetchPageInfo - fetchGroupInfo - fetchThreadInfo - fetchThreadMessages - fetchThreadList - fetchUnread - fetchUnseen - fetchImageUrl - fetchMessageInfo - fetchPollOptions - fetchPlanInfo - _getPrivateData - getPhoneNumbers - getEmails - getUserActiveStatus - fetchThreadImages - _oldMessage - _doSendRequest - quickReply - _sendLocation - sendLocation - sendPinnedLocation - _sendFiles - sendRemoteFiles - sendLocalFiles - sendRemoteVoiceClips - sendLocalVoiceClips - forwardAttachment - createGroup - addUsersToGroup - removeUserFromGroup - _adminStatus - addGroupAdmins - removeGroupAdmins - changeGroupApprovalMode - _usersApproval - acceptUsersToGroup - denyUsersFromGroup - _changeGroupImage - changeGroupImageRemote - changeGroupImageLocal - changeThreadTitle - changeNickname - changeThreadColor - changeThreadEmoji - reactToMessage - createPlan - editPlan - deletePlan - changePlanParticipation - createPoll - updatePollVote - setTypingStatus - markAsDelivered - _readStatus - markAsRead - markAsUnread - markAsSeen - friendConnect - removeFriend - blockUser - unblockUser - moveThreads - deleteThreads - markAsSpam - deleteMessages - muteThread - unmuteThread - muteThreadReactions - unmuteThreadReactions - muteThreadMentions - unmuteThreadMentions - _pullMessage - _parseMessage - _doOneListen - setActiveStatus - onLoggingIn - on2FACode - onLoggedIn - onListening - onListenError - onMessage - onColorChange - onEmojiChange - onTitleChange - onImageChange - onNicknameChange - onAdminAdded - onAdminRemoved - onApprovalModeChange - onMessageSeen - onMessageDelivered - onMarkedSeen - onMessageUnsent - onPeopleAdded - onPersonRemoved - onFriendRequest - onInbox - onTyping - onGamePlayed - onReactionAdded - onReactionRemoved - onBlock - onUnblock - onLiveLocation - onCallStarted - onCallEnded - onUserJoinedCall - onPollCreated - onPollVoted - onPlanCreated - onPlanEnded - onPlanEdited - onPlanDeleted - onPlanParticipation - onQprimer - onChatTimestamp - onBuddylistOverlay - onUnknownMesssageType - onMessageError
This commit is contained in:
@@ -17,8 +17,8 @@ from time import time
|
||||
],
|
||||
)
|
||||
def plan_data(request, client, user, thread, catch_event, compare):
|
||||
with catch_event("onPlanCreated") as x:
|
||||
client.createPlan(request.param, thread["id"])
|
||||
with catch_event("on_plan_created") as x:
|
||||
client.create_plan(request.param, thread["id"])
|
||||
assert compare(x)
|
||||
assert subset(
|
||||
vars(x.res["plan"]),
|
||||
@@ -32,8 +32,8 @@ def plan_data(request, client, user, thread, catch_event, compare):
|
||||
assert user["id"] in x.res["plan"].invited
|
||||
request.param.uid = x.res["plan"].uid
|
||||
yield x.res, request.param
|
||||
with catch_event("onPlanDeleted") as x:
|
||||
client.deletePlan(plan_id)
|
||||
with catch_event("on_plan_deleted") as x:
|
||||
client.delete_plan(plan_id)
|
||||
assert compare(x)
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ def test_create_delete_plan(plan_data):
|
||||
|
||||
def test_fetch_plan_info(client, catch_event, plan_data):
|
||||
event, plan = plan_data
|
||||
fetched_plan = client.fetchPlanInfo(plan.uid)
|
||||
fetched_plan = client.fetch_plan_info(plan.uid)
|
||||
assert subset(
|
||||
vars(fetched_plan), time=plan.time, title=plan.title, author_id=int(client.uid)
|
||||
)
|
||||
@@ -55,8 +55,8 @@ def test_change_plan_participation(
|
||||
client, thread, catch_event, compare, plan_data, take_part
|
||||
):
|
||||
event, plan = plan_data
|
||||
with catch_event("onPlanParticipation") as x:
|
||||
client.changePlanParticipation(plan, take_part=take_part)
|
||||
with catch_event("on_plan_participation") as x:
|
||||
client.change_plan_participation(plan, take_part=take_part)
|
||||
assert compare(x, take_part=take_part)
|
||||
assert subset(
|
||||
vars(x.res["plan"]),
|
||||
@@ -72,8 +72,8 @@ def test_change_plan_participation(
|
||||
def test_edit_plan(client, thread, catch_event, compare, plan_data):
|
||||
event, plan = plan_data
|
||||
new_plan = Plan(plan.time + 100, random_hex())
|
||||
with catch_event("onPlanEdited") as x:
|
||||
client.editPlan(plan, new_plan)
|
||||
with catch_event("on_plan_edited") as x:
|
||||
client.edit_plan(plan, new_plan)
|
||||
assert compare(x)
|
||||
assert subset(
|
||||
vars(x.res["plan"]),
|
||||
@@ -86,8 +86,8 @@ def test_edit_plan(client, thread, catch_event, compare, plan_data):
|
||||
@pytest.mark.trylast
|
||||
@pytest.mark.expensive
|
||||
def test_on_plan_ended(client, thread, catch_event, compare):
|
||||
with catch_event("onPlanEnded") as x:
|
||||
client.createPlan(Plan(int(time()) + 120, "Wait for ending"))
|
||||
with catch_event("on_plan_ended") as x:
|
||||
client.create_plan(Plan(int(time()) + 120, "Wait for ending"))
|
||||
x.wait(180)
|
||||
assert subset(
|
||||
x.res,
|
||||
@@ -96,15 +96,15 @@ def test_on_plan_ended(client, thread, catch_event, compare):
|
||||
)
|
||||
|
||||
|
||||
# createPlan(self, plan, thread_id=None)
|
||||
# editPlan(self, plan, new_plan)
|
||||
# deletePlan(self, plan)
|
||||
# changePlanParticipation(self, plan, take_part=True)
|
||||
# create_plan(self, plan, thread_id=None)
|
||||
# edit_plan(self, plan, new_plan)
|
||||
# delete_plan(self, plan)
|
||||
# change_plan_participation(self, plan, take_part=True)
|
||||
|
||||
# onPlanCreated(self, mid=None, plan=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# onPlanEnded(self, mid=None, plan=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# onPlanEdited(self, mid=None, plan=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# onPlanDeleted(self, mid=None, plan=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# onPlanParticipation(self, mid=None, plan=None, take_part=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# on_plan_created(self, mid=None, plan=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# on_plan_ended(self, mid=None, plan=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# on_plan_edited(self, mid=None, plan=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# on_plan_deleted(self, mid=None, plan=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
# on_plan_participation(self, mid=None, plan=None, take_part=None, author_id=None, thread_id=None, thread_type=None, ts=None, metadata=None, msg=None)
|
||||
|
||||
# fetchPlanInfo(self, plan_id)
|
||||
# fetch_plan_info(self, plan_id)
|
||||
|
Reference in New Issue
Block a user