def test_reply_message(self):
    self._send_message('**test message**')
    self._send_message('**test message**')
    parent_message_id = self._get_message_id((self.chat_window.messageList.count() - 1))
    self._activate_context_menu_action(Actions.REPLY)
    self.chat_window.messageText.setPlainText('test reply')
    QtTest.QTest.mouseClick(self.chat_window.sendMessageBtn, QtCore.Qt.LeftButton)
    QtTest.QTest.qWait(100)
    with self.app.app_context():
        message = Message.query.filter_by(text='test reply')
        assert (message.count() == 1)
        assert (message.first().reply_id == parent_message_id)
def test_reply_message(self):
    self._send_message('**test message**')
    self._send_message('**test message**')
    parent_message_id = self._get_message_id((self.chat_window.messageList.count() - 1))
    self._activate_context_menu_action(Actions.REPLY)
    self.chat_window.messageText.setPlainText('test reply')
    QtTest.QTest.mouseClick(self.chat_window.sendMessageBtn, QtCore.Qt.LeftButton)
    QtTest.QTest.qWait(100)
    with self.app.app_context():
        message = Message.query.filter_by(text='test reply')
        assert (message.count() == 1)
        assert (message.first().reply_id == parent_message_id)