def test_search_songs_by_title(self): harn_load_fs2(self) ret = self.db.get_songs(query={'title': 'mock_title'}) info = ret[0] assert info['title'], ret assert info.get('bitRate'), ret print info
def test_get_song_by_id(self): #self.harn_load_fs() harn_load_fs2(self) assert self.id_songs, "Empty id_songs: %s" % self.id_songs for eid in self.id_songs: info = self.db.get_songs(eid=eid) assert 'path' in info, "error processing eid: %s" % eid assert 'created' in info, "missing created in %s" % info
def setup(self): log.info("Setup************") self.test_dir = os.getcwd() + "/test/data/" self.iposonic = Iposonic([self.test_dir]) self.db = self.iposonic.db harn_load_fs2(self) assert self.iposonic.db.albums assert self.iposonic.db.songs
def setup(self): harn_setup(self, "/test/data") harn_load_fs2(self) self.setup_playlist()
def test_search_songs_by_artist(self): harn_load_fs2(self) ret = self.db.get_songs(query={'artist': 'mock_artist'}) assert ret[0]['title'], ret
def setup(self): harn_setup(self, "/test/data", add_songs=False, dbfile=self.dbfile) harn_load_fs2(self)