Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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
Ejemplo n.º 5
0
    def setup(self):
        harn_setup(self, "/test/data")
        harn_load_fs2(self)

        self.setup_playlist()
Ejemplo n.º 6
0
 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
Ejemplo n.º 7
0
 def setup(self):
     harn_setup(self, "/test/data", add_songs=False, dbfile=self.dbfile)
     harn_load_fs2(self)
Ejemplo n.º 8
0
    def setup(self):
        harn_setup(self, "/test/data")
        harn_load_fs2(self)

        self.setup_playlist()