Fix some asserts

This commit is contained in:
Philip Ridout 2019-03-03 17:44:40 +00:00
parent 07ffb7c0d0
commit 1fe56bc089
2 changed files with 8 additions and 8 deletions

View File

@ -236,8 +236,8 @@ class TestSongMaintenanceForm(TestCase, TestMixin):
assert MockedQListWidgetItem.call_args_list == expected_widget_item_calls, MockedQListWidgetItem.call_args_list
mocked_author_item1.setData.assert_called_once_with(QtCore.Qt.UserRole, 2)
mocked_author_item2.setData.assert_called_once_with(QtCore.Qt.UserRole, 1)
mocked_authors_list_widget.addItem.call_args_list == [
call(mocked_author_item1), call(mocked_author_item2)]
mocked_authors_list_widget.addItem.assert_has_calls([
call(mocked_author_item1), call(mocked_author_item2)])
@patch('openlp.plugins.songs.forms.songmaintenanceform.QtWidgets.QListWidgetItem')
@patch('openlp.plugins.songs.forms.songmaintenanceform.Topic')

View File

@ -601,9 +601,9 @@ class TestPJLinkCommands(TestCase):
# THEN: Power should be set to ON
assert pjlink.power == S_STANDBY, 'Power should not have changed'
assert mock_UpdateIcons.emit.called is False, 'projectorUpdateIcons() should not have been called'
mock_change_status.called is False, 'change_status() should not have been called'
mock_send_command.called is False, 'send_command() should not have been called'
mock_UpdateIcons.emit.assert_not_called()
mock_change_status.assert_not_called()
mock_send_command.assert_not_called()
mock_log.warning.assert_has_calls(log_warn_calls)
def test_projector_process_powr_off(self):
@ -623,9 +623,9 @@ class TestPJLinkCommands(TestCase):
# THEN: Power should be set to ON
assert pjlink.power == S_STANDBY, 'Power should have changed to S_STANDBY'
assert mock_UpdateIcons.emit.called is True, 'projectorUpdateIcons should have been called'
mock_change_status.called is True, 'change_status should have been called'
mock_send_command.called is False, 'send_command should not have been called'
mock_UpdateIcons.emit.assert_called_with()
mock_change_status.assert_called_with(313)
mock_send_command.assert_not_called()
def test_projector_process_rfil_save(self):
"""