]> kaliko git repositories - mpd-sima.git/blobdiff - tests/test_track.py
Prevent adding empty track to history (Closes #5)
[mpd-sima.git] / tests / test_track.py
index 80a709e04fdfcb2034d2292a9215c7dc773e4373..62eb30617f5761c8a0369513cd3aaf591d14a936 100644 (file)
@@ -33,6 +33,8 @@ class TestTrackObject(unittest.TestCase):
 
     def test_boolean_type(self):
         self.assertFalse(bool(Track()))
+        for trk in [{}, {'artist': 'Devolt'}, {'artist': 'Devolt', 'file':''}]:
+            self.assertFalse(bool(Track(**trk)))
 
     def test_albumartist(self):
         trk = Track(albumartist='album_artist', artist='track_artist')