]> kaliko git repositories - python-musicpd.git/blobdiff - test.py
Add missing test for plain MPD_HOST="example.org"
[python-musicpd.git] / test.py
diff --git a/test.py b/test.py
index fce9da033d9f4f3b9e057acfcf6a3a6222ef218a..14e4667d07c3c916f25f52231240da7ac329f64e 100755 (executable)
--- 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):