X-Git-Url: http://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=test.py;h=3da30bbed90d44dfdf8902007fb1871b19efe55c;hp=fce9da033d9f4f3b9e057acfcf6a3a6222ef218a;hb=0ef97395765f66ec3dc4ec67f813d156fea885f8;hpb=623a75fe41a972328374ce4a571bdc3f1b556ffc diff --git a/test.py b/test.py index fce9da0..3da30bb 100755 --- a/test.py +++ b/test.py @@ -61,6 +61,12 @@ class testEnvVar(unittest.TestCase): self.assertEqual(client.pwd, 'pa55w04d') self.assertEqual(client.host, 'example.org') + # Test host alone + os.environ['MPD_HOST'] = 'example.org' + client = musicpd.MPDClient() + self.assertFalse(client.pwd) + self.assertEqual(client.host, 'example.org') + # Test password extraction (no host) os.environ['MPD_HOST'] = 'pa55w04d@' with mock.patch('os.path.exists', return_value=False): @@ -126,7 +132,7 @@ class testEnvVar(unittest.TestCase): class TestMPDClient(unittest.TestCase): longMessage = True - # last sync: musicpd 0.4.2 unreleased / Mon Nov 17 21:45:22 CET 2014 + # last sync: musicpd 0.6.0 unreleased / Fri Feb 19 15:34:53 CET 2021 commands = { # Status Commands 'clearerror': 'nothing', @@ -143,6 +149,7 @@ class TestMPDClient(unittest.TestCase): 'random': 'nothing', 'repeat': 'nothing', 'setvol': 'nothing', + 'getvol': 'object', 'single': 'nothing', 'replay_gain_mode': 'nothing', 'replay_gain_status': 'item', @@ -157,7 +164,7 @@ class TestMPDClient(unittest.TestCase): 'seekid': 'nothing', 'seekcur': 'nothing', 'stop': 'nothing', - # Playlist Commands + # Queue Commands 'add': 'nothing', 'addid': 'item', 'clear': 'nothing', @@ -193,19 +200,23 @@ class TestMPDClient(unittest.TestCase): 'rm': 'nothing', 'save': 'nothing', # Database Commands + 'albumart': 'composite', 'count': 'object', + 'getfingerprint': 'object', 'find': 'songs', 'findadd': 'nothing', 'list': 'list', 'listall': 'database', 'listallinfo': 'database', + 'listfiles': 'database', 'lsinfo': 'database', + 'readcomments': 'object', + 'readpicture': 'composite', 'search': 'songs', 'searchadd': 'nothing', 'searchaddpl': 'nothing', 'update': 'item', 'rescan': 'item', - 'readcomments': 'object', # Mounts and neighbors 'mount': 'nothing', 'unmount': 'nothing', @@ -222,20 +233,28 @@ class TestMPDClient(unittest.TestCase): 'kill': None, 'password': 'nothing', 'ping': 'nothing', + 'binarylimit': 'nothing', + 'tagtypes': 'list', + 'tagtypes disable': 'nothing', + 'tagtypes enable': 'nothing', + 'tagtypes clear': 'nothing', + 'tagtypes all': 'nothing', # Partition Commands 'partition': 'nothing', 'listpartitions': 'list', 'newpartition': 'nothing', + 'delpartition': 'nothing', + 'moveoutput': 'nothing', # Audio Output Commands 'disableoutput': 'nothing', 'enableoutput': 'nothing', 'toggleoutput': 'nothing', 'outputs': 'outputs', + 'outputset': 'nothing', # Reflection Commands 'config': 'object', 'commands': 'list', 'notcommands': 'list', - 'tagtypes': 'list', 'urlhandlers': 'list', 'decoders': 'plugins', # Client to Client