Added api.py methods testcases#1864
Merged
PeterSurda merged 7 commits intoBitmessage:v0.6from Dec 3, 2021
Merged
Conversation
PeterSurda
reviewed
Oct 22, 2021
PeterSurda
reviewed
Oct 22, 2021
PeterSurda
reviewed
Oct 22, 2021
PeterSurda
reviewed
Oct 22, 2021
PeterSurda
reviewed
Oct 22, 2021
PeterSurda
reviewed
Oct 22, 2021
PeterSurda
reviewed
Oct 22, 2021
PeterSurda
reviewed
Oct 22, 2021
443ad5a to
a172230
Compare
g1itch
reviewed
Oct 25, 2021
734207d to
79812fd
Compare
PeterSurda
reviewed
Oct 28, 2021
PeterSurda
requested changes
Oct 28, 2021
Member
PeterSurda
left a comment
There was a problem hiding this comment.
Make test strings into variables (maybe class variables)
18c48a9 to
d84cd8a
Compare
PeterSurda
reviewed
Oct 29, 2021
PeterSurda
reviewed
Oct 29, 2021
PeterSurda
reviewed
Oct 29, 2021
PeterSurda
requested changes
Oct 29, 2021
Member
PeterSurda
left a comment
There was a problem hiding this comment.
make the changes as discussed
d84cd8a to
754d20b
Compare
PeterSurda
reviewed
Nov 1, 2021
PeterSurda
reviewed
Nov 1, 2021
g1itch
reviewed
Nov 1, 2021
PeterSurda
reviewed
Nov 2, 2021
PeterSurda
reviewed
Nov 2, 2021
dfe8c1e to
4553802
Compare
PeterSurda
reviewed
Nov 3, 2021
PeterSurda
reviewed
Nov 3, 2021
PeterSurda
requested changes
Nov 11, 2021
867d419 to
8bf2c78
Compare
g1itch
reviewed
Nov 11, 2021
g1itch
reviewed
Nov 11, 2021
Collaborator
g1itch
left a comment
There was a problem hiding this comment.
Another portion of garbage );
| sample_deterministic_addr4 = 'BM-2cWzSnwjJ7yRP3nLEWUV5LisTZyREWSzUK' | ||
|
|
||
| sample_statusbar_msg = "new status bar message" | ||
| sample_inbox_msg_receiver_address = 'BM-2cWzSnwjJ7yRP3nLEWUV5LisTZyREWSzUK' |
Collaborator
There was a problem hiding this comment.
Why double the sample_deterministic_addr4 3 lines above?
8d67694 to
53cd1d2
Compare
PeterSurda
reviewed
Nov 16, 2021
53cd1d2 to
682f042
Compare
PeterSurda
reviewed
Nov 17, 2021
| """Test two numeric params""" | ||
| return a + b | ||
|
|
||
| @command('clearUISignalQueue') |
Member
There was a problem hiding this comment.
something to make this only available in test mode
Member
There was a problem hiding this comment.
My preferred way would be to create an additional decorator for testmode functions.
PeterSurda
reviewed
Nov 17, 2021
| """Update GUI statusbar message""" | ||
| queues.UISignalQueue.put(('updateStatusBar', message)) | ||
|
|
||
| @command('getStatusBar') |
PeterSurda
reviewed
Nov 22, 2021
| self.aliases = aliases | ||
|
|
||
| def __call__(self, func): | ||
| if func.__name__ in ["HandleclearUISignalQueue", "HandleGetStatusBar"] \ |
Member
There was a problem hiding this comment.
create a constant, say
TESTMODE_FUNCTIONS = ["HandleclearUISignalQueue", "HandleGetStatusBar"]
if func.__name__ in TESTMODE_FUNCTIONS and not state.testmode:
return None
PeterSurda
reviewed
Nov 22, 2021
PeterSurda
reviewed
Nov 22, 2021
| len(json.loads( | ||
| self.api.getAllInboxMessageIds())["inboxMessageIds"]) == 2 | ||
| ) | ||
| self.assertTrue( |
PeterSurda
reviewed
Nov 22, 2021
| len(json.loads( | ||
| self.api.getInboxMessageById(hexlify(sample_inbox_msg_ids[2])))["inboxMessage"]) == 1 | ||
| ) | ||
| self.assertTrue( |
PeterSurda
reviewed
Nov 30, 2021
…MessageById, getInboxMessagesByReceiver, trashMessage, trashInboxMessage & addSubscription, methods testcases & updated related functions
…r functions, replaced sample_inbox_msg_receiver_address by sample_deterministic_addr4
…& added print for getAllInboxMessages to check build failure
… api.py and separated inbox & trash testcases
b3b5dae to
5771f21
Compare
PeterSurda
reviewed
Dec 3, 2021
| self.aliases = aliases | ||
|
|
||
| def __call__(self, func): | ||
|
|
PeterSurda
reviewed
Dec 3, 2021
| len(json.loads( | ||
| self.api.getAllInboxMessages())["inboxMessages"]), | ||
| 4, | ||
| json.loads(self.api.getAllInboxMessages())["inboxMessages"] |
Member
There was a problem hiding this comment.
Maybe add a comment explaining this is the custom error message to aid in debugging.
PeterSurda
approved these changes
Dec 3, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added statusBar, getAllInboxMessages, getAllInboxMessageIds, getInboxMessageById, getInboxMessagesByReceiver, trashMessage, trashInboxMessage & addSubscription, methods testcases