fixed database test

This commit is contained in:
DJ2LS 2024-02-07 19:49:00 +01:00
parent 0a9ce0d202
commit 8ef8744ba1

View file

@ -38,9 +38,9 @@ class TestDataFrameFactory(unittest.TestCase):
received_message = MessageP2P.from_payload(payload) received_message = MessageP2P.from_payload(payload)
received_message_dict = MessageP2P.to_dict(received_message) received_message_dict = MessageP2P.to_dict(received_message)
self.database_manager.add_message(received_message_dict) self.database_manager.add_message(received_message_dict)
result = self.database_manager.get_message_by_id(message.id)
result = self.database_manager.get_all_messages() self.assertEqual(result["destination"], message.destination)
self.assertEqual(result[0]["destination"], message.destination)
def testDeleteFromDatabase(self): def testDeleteFromDatabase(self):
attachment = { attachment = {