Return 'positive' but empty results on 'count' and 'list'
This commit is contained in:
parent
ed39840c67
commit
bc1167ba06
@ -540,7 +540,7 @@ class MpdHandler(object):
|
||||
Counts the number of songs and their total playtime in the db
|
||||
matching ``TAG`` exactly.
|
||||
"""
|
||||
raise MpdNotImplemented # TODO
|
||||
return [('songs', 0), ('playtime', 0)] # TODO
|
||||
|
||||
@handle_pattern(r'^find "(?P<type>(album|artist|title))" '
|
||||
r'"(?P<what>[^"]+)"$')
|
||||
@ -588,7 +588,7 @@ class MpdHandler(object):
|
||||
``ARTIST`` is an optional parameter when type is ``album``, this
|
||||
specifies to list albums by an artist.
|
||||
"""
|
||||
raise MpdNotImplemented # TODO
|
||||
pass # TODO
|
||||
|
||||
@handle_pattern(r'^listall "(?P<uri>[^"]+)"')
|
||||
def _music_db_listall(self, uri):
|
||||
|
||||
@ -868,7 +868,9 @@ class MusicDatabaseHandlerTest(unittest.TestCase):
|
||||
|
||||
def test_count(self):
|
||||
result = self.h.handle_request(u'count "tag" "needle"')
|
||||
self.assert_(u'ACK Not implemented' in result)
|
||||
self.assert_(u'songs: 0' in result)
|
||||
self.assert_(u'playtime: 0' in result)
|
||||
self.assert_(u'OK' in result)
|
||||
|
||||
def test_find_album(self):
|
||||
result = self.h.handle_request(u'find "album" "what"')
|
||||
@ -895,7 +897,7 @@ class MusicDatabaseHandlerTest(unittest.TestCase):
|
||||
|
||||
def test_list_artist(self):
|
||||
result = self.h.handle_request(u'list "artist"')
|
||||
self.assert_(u'ACK Not implemented' in result)
|
||||
self.assert_(u'OK' in result)
|
||||
|
||||
def test_list_artist_with_artist_should_fail(self):
|
||||
try:
|
||||
@ -906,11 +908,11 @@ class MusicDatabaseHandlerTest(unittest.TestCase):
|
||||
|
||||
def test_list_album_without_artist(self):
|
||||
result = self.h.handle_request(u'list "album"')
|
||||
self.assert_(u'ACK Not implemented' in result)
|
||||
self.assert_(u'OK' in result)
|
||||
|
||||
def test_list_album_with_artist(self):
|
||||
result = self.h.handle_request(u'list "album" "anartist"')
|
||||
self.assert_(u'ACK Not implemented' in result)
|
||||
self.assert_(u'OK' in result)
|
||||
|
||||
def test_listall(self):
|
||||
result = self.h.handle_request(u'listall "file:///dev/urandom"')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user