diff --git a/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py b/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py index b5e6ee49e..e7985fe51 100644 --- a/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py +++ b/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py @@ -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') diff --git a/tests/openlp_core/projectors/test_projector_pjlink_commands_01.py b/tests/openlp_core/projectors/test_projector_pjlink_commands_01.py index a03e84db5..eb85ac1f3 100644 --- a/tests/openlp_core/projectors/test_projector_pjlink_commands_01.py +++ b/tests/openlp_core/projectors/test_projector_pjlink_commands_01.py @@ -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): """