From 2d715cb0549de365d41e5e95daef269723fde809 Mon Sep 17 00:00:00 2001 From: Kaliko Jack Date: Fri, 19 Feb 2021 15:52:47 +0100 Subject: [PATCH] Add missing test for plain MPD_HOST="example.org" --- test.py | 6 ++++++ 1 file changed, 6 insertions(+) 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): -- 2.39.5