From: Kaliko Jack Date: Thu, 18 Feb 2021 14:41:21 +0000 (+0100) Subject: Add test for command lists X-Git-Tag: v0.6.0~10 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=623a75fe41a972328374ce4a571bdc3f1b556ffc;p=python-musicpd.git Add test for command lists --- diff --git a/test.py b/test.py index ecf62ff..fce9da0 100755 --- a/test.py +++ b/test.py @@ -503,6 +503,21 @@ class TestMPDClient(unittest.TestCase): res = self.client.albumart('muse/Raised Fist/2002-Dedication/', 0) self.assertEqual(res.get('data'), data) + def test_command_list(self): + self.MPDWillReturn('updating_db: 42\n', + f'{musicpd.NEXT}\n', + 'repeat: 0\n', + 'random: 0\n', + f'{musicpd.NEXT}\n', + f'{musicpd.NEXT}\n', + 'OK\n') + self.client.command_list_ok_begin() + self.client.update() + self.client.status() + self.client.repeat(1) + self.client.command_list_end() + self.assertMPDReceived('command_list_end\n') + if __name__ == '__main__': unittest.main()