def test_edit_message(self):
    self._send_message('**test message**')
    self._send_message('**test message**')
    self._activate_context_menu_action(Actions.EDIT)
    self.chat_window.messageText.setPlainText('test edit')
    QtTest.QTest.mouseClick(self.chat_window.editMessageBtn, QtCore.Qt.LeftButton)
    QtTest.QTest.qWait(100)
    with self.app.app_context():
        assert (Message.query.filter_by(text='test edit').count() == 1)
def test_edit_message(self):
    self._send_message('**test message**')
    self._send_message('**test message**')
    self._activate_context_menu_action(Actions.EDIT)
    self.chat_window.messageText.setPlainText('test edit')
    QtTest.QTest.mouseClick(self.chat_window.editMessageBtn, QtCore.Qt.LeftButton)
    QtTest.QTest.qWait(100)
    with self.app.app_context():
        assert (Message.query.filter_by(text='test edit').count() == 1)