This commit is contained in:
Tim Bentley 2017-12-20 17:30:39 +00:00
parent 8e69c65b09
commit d87d8181df
3 changed files with 4 additions and 5 deletions

View File

@ -425,8 +425,7 @@ class TestSystemPlayer(TestCase):
assert expected_position_calls == mocked_display.media_player.position.call_args_list
mocked_set_visible.assert_called_once_with(mocked_display, False)
mocked_display.controller.seek_slider.isSliderDown.assert_called_once_with()
assert expected_block_signals_calls == \
mocked_display.controller.seek_slider.blockSignals.call_args_list
assert expected_block_signals_calls == mocked_display.controller.seek_slider.blockSignals.call_args_list
mocked_display.controller.seek_slider.setSliderPosition.assert_called_once_with(2)
def test_get_media_display_css(self):

View File

@ -104,7 +104,7 @@ class TestFileDialogPatches(TestCase):
result = FileDialog.getOpenFileName()
# THEN: getOpenFileName() should return a tuple with the second value set to a the selected filter
assert result[1] == 'selected filter'
assert result[1] == 'selected filter'
def test_get_open_file_names_user_abort(self):
"""

View File

@ -150,7 +150,7 @@ class TestListPreviewWidget(TestCase):
# THEN: setRowHeight() should not be called, while resizeRowsToContents() should be called twice
# (once each in __recalculate_layout and replace_service_item)
assert mocked_resizeRowsToContents.call_count == 2, 'Should be called'
assert mocked_resizeRowsToContents.call_count == 2, 'Should be called'
assert mocked_setRowHeight.call_count == 0, 'Should not be called'
@patch(u'openlp.core.widgets.views.ListPreviewWidget.resizeRowsToContents')
@ -439,7 +439,7 @@ class TestListPreviewWidget(TestCase):
assert mocked_scrollToItem.call_count == 0, 'Should not be called'
assert mocked_selectRow.call_count == 0, 'Should not be called'
assert mocked_item.call_count == 0, 'Should not be called'
@patch(u'openlp.core.widgets.views.ListPreviewWidget.selectRow')
@patch(u'openlp.core.widgets.views.ListPreviewWidget.scrollToItem')
@patch(u'openlp.core.widgets.views.ListPreviewWidget.item')