예제 #1
0
 def test_store_get(self):
     m = QChatMailbox()
     m.storeMessage(self.test_message)
     stored = m.getMessage(self.test_user)
     assert stored.sender == self.test_message.sender
     assert stored.header == self.test_message.header
     assert stored.data == self.test_message.data
예제 #2
0
 def test_getMessage(self):
     m = QChatMailbox()
     assert m.getMessage("User") == None
     m.messages[self.test_user] = [self.test_message]
     assert m.getMessage("User") == self.test_message