diff --git a/mopidy/mpd/handler.py b/mopidy/mpd/handler.py index 475a6bb0..aacad28c 100644 --- a/mopidy/mpd/handler.py +++ b/mopidy/mpd/handler.py @@ -70,6 +70,15 @@ class MpdHandler(object): response.append(u'OK') return response + @register(r'^ack$') + def _ack(self): + """ + Always returns an 'ACK' and not 'OK'. + + Not a part of the MPD protocol. + """ + raise MpdNotImplemented + @register(r'^add "(?P[^"]*)"$') def _add(self, uri): raise MpdNotImplemented # TODO diff --git a/tests/mpd/handlertest.py b/tests/mpd/handlertest.py index 3f5e4bb5..339d73df 100644 --- a/tests/mpd/handlertest.py +++ b/tests/mpd/handlertest.py @@ -66,6 +66,12 @@ class CommandListsTest(unittest.TestCase): self.assert_(u'OK' in result) self.assertEquals(False, self.h.command_list) + def test_command_list_with_error(self): + self.h.handle_request(u'command_list_begin') + self.h.handle_request(u'ack') + result = self.h.handle_request(u'command_list_end') + self.assert_(u'ACK' in result[-1]) + def test_command_list_ok_begin(self): result = self.h.handle_request(u'command_list_ok_begin') self.assert_(result is None)