From f50b81b9fb652c69ce0ba7e7737a245dbee7424e Mon Sep 17 00:00:00 2001 From: Ee Savior <2930438-eSavior@users.noreply.gitlab.com> Date: Tue, 26 Nov 2019 19:32:16 +0000 Subject: [PATCH] Test improvements --- .../openlp_plugins/songs/forms/test_songmaintenanceform.py | 3 ++- tests/openlp_core/api/test_zeroconf.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py b/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py index f25f782e1..4fb36618a 100644 --- a/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py +++ b/tests/interfaces/openlp_plugins/songs/forms/test_songmaintenanceform.py @@ -232,7 +232,8 @@ class TestSongMaintenanceForm(TestCase, TestMixin): expected_widget_item_calls = [call('John Wesley'), call('John Newton')] mocked_authors_list_widget.clear.assert_called_once_with() self.mocked_manager.get_all_objects.assert_called_once_with(MockedAuthor) - assert MockedQListWidgetItem.call_args_list == expected_widget_item_calls, MockedQListWidgetItem.call_args_list + # former third argument for below not needed anymore: MockedQListWidgetItem.call_args_list + self.assertCountEqual(MockedQListWidgetItem.call_args_list, expected_widget_item_calls) 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.assert_has_calls([ diff --git a/tests/openlp_core/api/test_zeroconf.py b/tests/openlp_core/api/test_zeroconf.py index 5ba366085..b50be1e2c 100644 --- a/tests/openlp_core/api/test_zeroconf.py +++ b/tests/openlp_core/api/test_zeroconf.py @@ -78,7 +78,7 @@ def test_zeroconf_worker_stop(): worker.stop() # THEN: _can_run should be False - assert worker._can_run is False + assert worker.can_run() is False @patch('openlp.core.api.zeroconf.get_network_interfaces')