Merged inbox & trash functions related testcases into single testcase method
This commit is contained in:
parent
21d5a6ce8f
commit
16175278a8
|
@ -97,18 +97,19 @@ class TestAPI(TestAPIProto):
|
||||||
sample_statusbar_msg
|
sample_statusbar_msg
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_message_inbox(self):
|
def test_message_inbox_and_trash(self):
|
||||||
"""Test message inbox methods"""
|
"""Test message inbox methods"""
|
||||||
|
# Inbox function related tests
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(json.loads(
|
len(json.loads(
|
||||||
self.api.getAllInboxMessages())["inboxMessages"]),
|
self.api.getAllInboxMessages())["inboxMessages"]),
|
||||||
2,
|
4,
|
||||||
json.loads(self.api.getAllInboxMessages())["inboxMessages"]
|
json.loads(self.api.getAllInboxMessages())["inboxMessages"]
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(json.loads(
|
len(json.loads(
|
||||||
self.api.getAllInboxMessageIds())["inboxMessageIds"]),
|
self.api.getAllInboxMessageIds())["inboxMessageIds"]),
|
||||||
2
|
4
|
||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(json.loads(
|
len(json.loads(
|
||||||
|
@ -118,11 +119,10 @@ class TestAPI(TestAPIProto):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(json.loads(
|
len(json.loads(
|
||||||
self.api.getInboxMessagesByReceiver(sample_deterministic_addr4))["inboxMessages"]),
|
self.api.getInboxMessagesByReceiver(sample_deterministic_addr4))["inboxMessages"]),
|
||||||
2
|
4
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_delete_message(self):
|
# Trash function related tests
|
||||||
"""Test delete message methods"""
|
|
||||||
messages_before_delete = len(json.loads(self.api.getAllInboxMessageIds())["inboxMessageIds"])
|
messages_before_delete = len(json.loads(self.api.getAllInboxMessageIds())["inboxMessageIds"])
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.api.trashMessage(hexlify(sample_inbox_msg_ids[0])),
|
self.api.trashMessage(hexlify(sample_inbox_msg_ids[0])),
|
||||||
|
|
Reference in New Issue
Block a user