Commit Graph

107 Commits

Author SHA1 Message Date
Mads Marquart
6baa594538 Fix user affinity test 2020-01-09 10:49:12 +01:00
Mads Marquart
152f20027a Add ThreadABC helper, that'll contain functions that threads can call 2020-01-09 00:35:43 +01:00
Mads Marquart
4199439e07 Remove Thread.type 2020-01-08 23:52:14 +01:00
Mads Marquart
0531a9e482 Add session attribute to Group/User/Page/Thread 2020-01-08 23:11:39 +01:00
Mads Marquart
a5abb05ab3 Rename .uid -> .id everywhere 2020-01-08 23:09:51 +01:00
Mads Marquart
a97ef67411 Backport e348425 2019-12-15 15:26:53 +01:00
Mads Marquart
1f96c624e7 Combine variously sized previews to a single key 2019-12-11 16:20:38 +01:00
Mads Marquart
91d4055545 Make models use kw_only (on Python > 3.5) 2019-12-11 16:12:14 +01:00
Mads Marquart
27ae1c9f88 Stop mutating models 2019-12-11 16:12:14 +01:00
Mads Marquart
b03d0ae3b7 Allow specifying class variables in init 2019-12-11 16:12:14 +01:00
Mads Marquart
637ea97ffe Add Image model 2019-12-11 16:12:14 +01:00
Mads Marquart
e348425204 Fix black version 2019-12-11 16:11:54 +01:00
Mads Marquart
41a445a989 Add ShareAttachment subattachment tests 2019-10-28 10:33:45 +01:00
Mads Marquart
80c7fff571 Add file attachment tests 2019-10-28 10:33:04 +01:00
Mads Marquart
e2d98356ad Add poll tests 2019-10-27 14:40:09 +01:00
Mads Marquart
a8412ea3d8 Add plan tests 2019-10-27 14:40:09 +01:00
Mads Marquart
71177d8bf9 Add group test 2019-10-27 14:40:09 +01:00
Mads Marquart
5019aac6b7 Add page test 2019-10-27 14:40:09 +01:00
Mads Marquart
0c305f621a Add user tests 2019-10-27 14:40:09 +01:00
Mads Marquart
ef73bb27aa Add graphql tests 2019-10-27 14:40:09 +01:00
Mads Marquart
bd499c1ea2 Add message tests 2019-10-27 14:40:09 +01:00
Mads Marquart
24c4b10012 Add thread tests 2019-10-27 14:40:09 +01:00
Mads Marquart
648cbb4999 Add location tests, and fix live location expires_at parsing 2019-10-27 14:40:09 +01:00
Mads Marquart
ef5c86c427 Add quick reply tests 2019-10-27 14:40:09 +01:00
Mads Marquart
5e0b80cada Add sticker tests 2019-10-27 14:40:09 +01:00
Mads Marquart
9898e8cd19 Add attachment tests 2019-10-27 14:40:09 +01:00
Mads Marquart
77d9b25bf0 Add utility function tests 2019-10-27 14:40:08 +01:00
Mads Marquart
d06ff7078a Mark existing tests as online
- Remove `offline` and `expensive` markers
2019-09-10 10:59:01 +02:00
Mads Marquart
614e5ad4bb 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
2019-09-08 19:59:53 +02:00
Mads Marquart
856c1ffe0e Remove ability to control the listening loop externally
It was probably scarcely used, and separate functionality will be
developed that makes this redundant anyhow.
2019-09-08 18:44:46 +02:00
Mads Marquart
b5a37e35c6 Remove FBchatUserError in favor of builtin exceptions 2019-09-08 18:44:46 +02:00
Mads Marquart
91cf4589a5 Remove ability to set a custom User-Agent
This causes issues if the User-Agent is set to resemble a mobile phone,
see #431, and besides, it's not an API surface I want / need to support.
2019-09-08 18:44:46 +02:00
Mads Marquart
7c758501fc Remove methods to set the default thread
This has been done to value explicitness over implicitness, and also
since the question of whether thread_id=None is acceptable was dependent
on mutable variables in Client.
2019-09-08 18:44:45 +02:00
Mads Marquart
da4ed73ec6 Remove models.py 2019-08-28 22:59:22 +02:00
Mads Marquart
66505f8f41 Remove redundant encoding specifiers and __future__ imports 2019-08-28 21:57:46 +02:00
Mads Marquart
6fb6e707ba Remove six dependency 2019-08-28 21:26:59 +02:00
Mads Marquart
e0710a2ec1 Format strings using black 2019-01-31 20:55:22 +01:00
Mads Marquart
d20fc3b9ce Format using black (without string normalization) 2019-01-31 20:54:32 +01:00
Mads Marquart
de5f3a9d9e Merge branch 'pr/300' 2019-01-31 20:13:27 +01:00
Mads Marquart
3443a233f4 Fix pytest "Applying marks directly to parameters" deprecation 2018-12-09 15:02:48 +01:00
2FWAH
af3bd55535 Add basic test for fetchThreads 2018-09-21 19:43:39 +02:00
Mads Marquart
348db90f7b Fixes for Python 2.7 compatibility 2018-08-29 23:50:35 +02:00
Mads Marquart
0d780b9b80 Added tests for plans 2018-08-29 21:31:28 +02:00
Mads Marquart
8ab718becd Added poll tests 2018-08-29 16:49:33 +02:00
Mads Marquart
3be0d8389b Changed changeThreadImageX to changeGroupImageX 2018-08-29 14:37:29 +02:00
Mads Marquart
c2225bf2fd Added more tests 2018-08-29 14:07:44 +02:00
Mads Marquart
0617d7b49f Fixed _usersApproval, fixed changeThreadImage methods, more tests 2018-08-29 12:17:16 +02:00
Mads Marquart
42b288ee98 Fixed onAdminRemoved and onAdminAdded, and added tests for that 2018-08-29 11:15:59 +02:00
Mads Marquart
ead7203e40 Added tests for fetchMessageInfo 2018-08-29 11:03:46 +02:00
Mads Marquart
bd2b947255 More test improvements 2018-08-29 10:14:18 +02:00