mpd: Test response for bad 'list' requests

This commit is contained in:
Stein Magnus Jodal 2012-11-20 00:31:41 +01:00
parent f82d3fca39
commit 7da2058b65

View File

@ -173,6 +173,10 @@ class MusicDatabaseListTest(protocol.BaseTestCase):
'list "artist" "artist" "anartist" "album" "analbum"')
self.assertInResponse('OK')
def test_list_artist_without_filter_value(self):
self.sendRequest('list "artist" "artist" ""')
self.assertInResponse('OK')
### Album
def test_list_album_with_quotes(self):
@ -191,6 +195,10 @@ class MusicDatabaseListTest(protocol.BaseTestCase):
self.sendRequest('list "album" "anartist"')
self.assertInResponse('OK')
def test_list_album_with_artist_name_without_filter_value(self):
self.sendRequest('list "album" ""')
self.assertInResponse('OK')
def test_list_album_by_artist(self):
self.sendRequest('list "album" "artist" "anartist"')
self.assertInResponse('OK')
@ -216,6 +224,10 @@ class MusicDatabaseListTest(protocol.BaseTestCase):
'list "album" "artist" "anartist" "album" "analbum"')
self.assertInResponse('OK')
def test_list_album_without_filter_value(self):
self.sendRequest('list "album" "artist" ""')
self.assertInResponse('OK')
### Date
def test_list_date_with_quotes(self):
@ -259,6 +271,10 @@ class MusicDatabaseListTest(protocol.BaseTestCase):
self.sendRequest('list "date" "artist" "anartist" "album" "analbum"')
self.assertInResponse('OK')
def test_list_date_without_filter_value(self):
self.sendRequest('list "date" "artist" ""')
self.assertInResponse('OK')
### Genre
def test_list_genre_with_quotes(self):
@ -303,6 +319,10 @@ class MusicDatabaseListTest(protocol.BaseTestCase):
'list "genre" "artist" "anartist" "album" "analbum"')
self.assertInResponse('OK')
def test_list_genre_without_filter_value(self):
self.sendRequest('list "genre" "artist" ""')
self.assertInResponse('OK')
class MusicDatabaseSearchTest(protocol.BaseTestCase):
def test_search_album(self):