From c798257f00a61ecb73b1c904e35240d25f2510a0 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Tue, 5 Aug 2014 18:34:08 +0200 Subject: [PATCH] mpd: Test that "list album foo" responds correctly Previously, test_list_album_with_artist_name would only test that the command didn't fail. Now it also checks that the response is correct. That is, that the response contains albums. This makes the test detect the error reported in #817. (cherry picked from commit 9771eda23068f4581a30059ac597f1360d349dcd) --- tests/mpd/protocol/test_music_db.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/mpd/protocol/test_music_db.py b/tests/mpd/protocol/test_music_db.py index 55ab75c5..e6712fef 100644 --- a/tests/mpd/protocol/test_music_db.py +++ b/tests/mpd/protocol/test_music_db.py @@ -880,7 +880,11 @@ class MusicDatabaseListTest(protocol.BaseTestCase): self.assertInResponse('OK') def test_list_album_with_artist_name(self): + self.backend.library.dummy_find_exact_result = SearchResult( + tracks=[Track(album=Album(name='foo'))]) + self.sendRequest('list "album" "anartist"') + self.assertInResponse('Album: foo') self.assertInResponse('OK') def test_list_album_with_artist_name_without_filter_value(self):