def onShortcutUnindentWithBackspace(self):
        """Backspace pressed, unindent
        """
        assert self._qpart.textBeforeCursor().endswith(self.text())

        charsToRemove = len(self._qpart.textBeforeCursor()) % len(self.text())
        if charsToRemove == 0:
            charsToRemove = len(self.text())

        cursor = self._qpart.textCursor()
        cursor.setPosition(cursor.position() - charsToRemove, QTextCursor.KeepAnchor)
        cursor.removeSelectedText()
def test_is_handled_property_returns_correct_value(self):
        self.assertFalse(self.voiceover_application.is_handled)

        self.voiceover_application.accept(self.reviewer_id)

        self.assertTrue(self.voiceover_application.is_handled)