X-Git-Url: http://git.kaliko.me/?p=python-musicpd.git;a=blobdiff_plain;f=test.py;h=14e4667d07c3c916f25f52231240da7ac329f64e;hp=fce9da033d9f4f3b9e057acfcf6a3a6222ef218a;hb=2d715cb0549de365d41e5e95daef269723fde809;hpb=bbb80ee761838dce989b3584a75fd26b53dcd9ce 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):