Too many open lines

This commit is contained in:
Raoul Snyman 2016-12-16 23:02:11 +02:00
parent 203ebde628
commit 36008338b2
2 changed files with 0 additions and 33 deletions

View File

@ -42,7 +42,6 @@ def test_create_about_form(mocked_get_application_version):
assert 'OpenLP 3.1.1 build 3000' in about_form.about_text_edit.toPlainText() assert 'OpenLP 3.1.1 build 3000' in about_form.about_text_edit.toPlainText()
@patch('openlp.core.ui.aboutform.webbrowser') @patch('openlp.core.ui.aboutform.webbrowser')
def test_on_volunteer_button_clicked(mocked_webbrowser): def test_on_volunteer_button_clicked(mocked_webbrowser):
""" """

View File

@ -28,7 +28,6 @@ from PyQt5 import QtCore, QtGui, QtWidgets
from openlp.core.common import Registry from openlp.core.common import Registry
from openlp.core.ui.shortcutlistform import ShortcutListForm from openlp.core.ui.shortcutlistform import ShortcutListForm
from openlp.core.ui.shortcutlistdialog import CaptureShortcutButton, ShortcutTreeWidget
from tests.interfaces import MagicMock, patch from tests.interfaces import MagicMock, patch
from tests.helpers.testmixin import TestMixin from tests.helpers.testmixin import TestMixin
@ -228,34 +227,3 @@ class TestShortcutform(TestCase, TestMixin):
mocked_action_shortcuts.assert_called_with(mocked_action) mocked_action_shortcuts.assert_called_with(mocked_action)
mocked_refresh_shortcut_list.assert_called_with() mocked_refresh_shortcut_list.assert_called_with()
mocked_set_text.assert_called_with('Esc') mocked_set_text.assert_called_with('Esc')
def test_key_press_event():
"""
Test the keyPressEvent method
"""
# GIVEN: A checked button and a mocked event
button = CaptureShortcutButton()
button.setChecked(True)
mocked_event = MagicMock()
mocked_event.key.return_value = QtCore.Qt.Key_Space
# WHEN: keyPressEvent is called with an event that should be ignored
button.keyPressEvent(mocked_event)
# THEN: The ignore() method on the event should have been called
mocked_event.ignore.assert_called_once_with()
def test_keyboard_search():
"""
Test the keyboardSearch method of the ShortcutTreeWidget
"""
# GIVEN: A ShortcutTreeWidget
widget = ShortcutTreeWidget()
# WHEN: keyboardSearch() is called
widget.keyboardSearch('')
# THEN: Nothing happens
assert True