Merged inbox & trash functions related testcases into single testcase method

This commit is contained in:
kuldeep.k@cisinlabs.com 2021-11-29 22:51:02 +05:30
parent 21d5a6ce8f
commit 16175278a8
No known key found for this signature in database
GPG Key ID: AF4FB299BF7C7C2A

View File

@ -97,18 +97,19 @@ class TestAPI(TestAPIProto):
sample_statusbar_msg
)
def test_message_inbox(self):
def test_message_inbox_and_trash(self):
"""Test message inbox methods"""
# Inbox function related tests
self.assertEqual(
len(json.loads(
self.api.getAllInboxMessages())["inboxMessages"]),
2,
4,
json.loads(self.api.getAllInboxMessages())["inboxMessages"]
)
self.assertEqual(
len(json.loads(
self.api.getAllInboxMessageIds())["inboxMessageIds"]),
2
4
)
self.assertEqual(
len(json.loads(
@ -118,11 +119,10 @@ class TestAPI(TestAPIProto):
self.assertEqual(
len(json.loads(
self.api.getInboxMessagesByReceiver(sample_deterministic_addr4))["inboxMessages"]),
2
4
)
def test_delete_message(self):
"""Test delete message methods"""
# Trash function related tests
messages_before_delete = len(json.loads(self.api.getAllInboxMessageIds())["inboxMessageIds"])
self.assertEqual(
self.api.trashMessage(hexlify(sample_inbox_msg_ids[0])),