Test improvements

This commit is contained in:
Ee Savior 2019-11-26 19:32:16 +00:00 committed by Tim Bentley
parent f8e499eaf2
commit f50b81b9fb
2 changed files with 3 additions and 2 deletions

View File

@ -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([

View File

@ -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')