From: Kaliko Jack Date: Fri, 19 Feb 2021 14:52:47 +0000 (+0100) Subject: Add missing test for plain MPD_HOST="example.org" X-Git-Tag: v0.6.0~7 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=2d715cb0549de365d41e5e95daef269723fde809;p=python-musicpd.git Add missing test for plain MPD_HOST="example.org" --- diff --git a/test.py b/test.py index fce9da0..14e4667 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):