From 623a75fe41a972328374ce4a571bdc3f1b556ffc Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Thu, 18 Feb 2021 15:41:21 +0100 Subject: [PATCH] Add test for command lists --- test.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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() -- 2.39.5