forked from openlp/openlp
Too many open lines
This commit is contained in:
parent
203ebde628
commit
36008338b2
@ -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()
|
||||
|
||||
|
||||
|
||||
@patch('openlp.core.ui.aboutform.webbrowser')
|
||||
def test_on_volunteer_button_clicked(mocked_webbrowser):
|
||||
"""
|
||||
|
@ -28,7 +28,6 @@ from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from openlp.core.common import Registry
|
||||
from openlp.core.ui.shortcutlistform import ShortcutListForm
|
||||
from openlp.core.ui.shortcutlistdialog import CaptureShortcutButton, ShortcutTreeWidget
|
||||
|
||||
from tests.interfaces import MagicMock, patch
|
||||
from tests.helpers.testmixin import TestMixin
|
||||
@ -228,34 +227,3 @@ class TestShortcutform(TestCase, TestMixin):
|
||||
mocked_action_shortcuts.assert_called_with(mocked_action)
|
||||
mocked_refresh_shortcut_list.assert_called_with()
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user