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 9771eda230)
This commit is contained in:
Trygve Aaberge 2014-08-05 18:34:08 +02:00 committed by Stein Magnus Jodal
parent 9dc8038025
commit c798257f00

View File

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