def main(): """Entry point for seedmgr""" # processes all command-line inputs that control how we execute # logging, run mode, etc.; and we get a handle back to access # the info service.prepare_service() # time to start processing process.start()
def test_process_empty_torrent(self): self.dbapi.save_torrent( models.Torrent(torrent_id=None, name='fake21.torrent')) FakeManager.DBAPI = self.dbapi self.patch(process, 'manager', FakeManager) process.start() self.assertTrue(True)
def test_process(self): tor1 = self.dbapi.save_torrent( models.Torrent(torrent_id=None, name='fake19.torrent')) _medias = [] for i in range(1, 3): _medias.append(models.MediaFile( media_id=None, torrent_id=tor1.torrent_id, filename='movie-{0}.mp4'.format(i), file_ext='.mp4', file_path='/tmp/media')) self.dbapi.bulk_create_medias(_medias) FakeManager.DBAPI = self.dbapi self.patch(process, 'manager', FakeManager) process.start() self.assertTrue(True)
def test_process_no_work(self): process.start() self.assertTrue(True)