def test_show_sources(mocker): """ Ensure the sources list is passed to the main view to be updated. """ w = Window() w.main_view = mocker.MagicMock() w.show_sources([1, 2, 3]) w.main_view.show_sources.assert_called_once_with([1, 2, 3])
def test_show_sources(): """ Ensure the sources list is passed to the source list widget to be updated. """ w = Window() w.main_view = mock.MagicMock() w.show_sources([1, 2, 3]) w.main_view.source_list.update.assert_called_once_with([1, 2, 3])