# HG changeset patch # User Reed Wade # Date 1588798338 -7200 # Wed May 06 22:52:18 2020 +0200 # Node ID 0b7520b550daf50be62de18dfb2c659bb9c6c6fa # Parent 7c9a10bb9f8c30706eb786605119514ee96887e7 Fix broken testes diff --git a/tests/test_browser.py b/tests/test_browser.py --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -85,11 +85,21 @@ assert refs[0].name == "a_provider_name" assert refs[1].name == "another_provider_name" -@mock.patch('mopidy_multisonic.uri_parser.build_artists', return_value="an artists uri") -def test_browse_top(http_client_config1): +@mock.patch('mopidy_multisonic.uri_parser.build_playlists') +@mock.patch('mopidy_multisonic.uri_parser.build_albums') +@mock.patch('mopidy_multisonic.uri_parser.build_artists') +def test_browse_top(mock_build_artists, mock_build_albums, mock_build_playlists, http_client_config1): + mock_build_artists.return_value = 'an artists uri' + mock_build_albums.return_value = 'an albums uri' + mock_build_playlists.return_value = 'a playlists uri' + refs = browser.browse_top(http_client_config1) assert refs[0].name == "Artists" - assert refs[0].uri == "an artists uri" + assert refs[0].uri == 'an artists uri' + assert refs[1].name == "Albums" + assert refs[1].uri == 'an albums uri' + assert refs[2].name == "Playlists" + assert refs[2].uri == 'a playlists uri' @mock.patch('mopidy_multisonic.uri_parser.build_artist', return_value="an artist uri") @mock.patch('mopidy_multisonic.httpclient.get_artists', return_value=mock_get_artists_data)