client = musicpd.MPDClient()
self.assertEqual(client.host, '/run/user/1000/mpd/socket')
+ # Test MPD_TIMEOUT
os.environ.pop('MPD_TIMEOUT', None)
client = musicpd.MPDClient()
- self.assertEqual(client.mpd_timeout, 30)
+ self.assertEqual(client.mpd_timeout, musicpd.CONNECTION_TIMEOUT)
os.environ['MPD_TIMEOUT'] = 'garbage'
client = musicpd.MPDClient()
- self.assertEqual(client.mpd_timeout, 30)
+ self.assertEqual(client.mpd_timeout,
+ musicpd.CONNECTION_TIMEOUT,
+ 'Garbage\'s not silently ignore to use default value')
os.environ['MPD_TIMEOUT'] = '42'
client = musicpd.MPDClient()
self.assertEqual(client.mpd_timeout, 42)