add start/stop/check torrent daemon

This commit is contained in:
stubbfel
2014-09-23 23:25:25 +02:00
parent 74bd0f0220
commit 912d3962a2
5 changed files with 165 additions and 94 deletions

View File

@@ -7,7 +7,7 @@ import urllib
import os
from config.config import Config
import shutil
import utilities.file_methods as fm
import subprocess
class TestTorrentCliEntryHandler(unittest.TestCase):
@@ -45,7 +45,9 @@ class TestTorrentCliEntryHandler(unittest.TestCase):
self.assertTrue(os.path.exists(TorrentCliEntryHandler.SettingFile))
def test_start_torrent(self):
self.__tceh.start_torrent("/home/dev/projects/feedcrawler/testenv/testfeeds/podcast/SBK028_Arbeit.mp3.torrent", "testtorrents/", "testtorrents/")
tc = self.__tceh.start_torrent("/home/dev/projects/feedcrawler/testenv/testfeeds/podcast/SBK028_Arbeit.mp3.torrent", "testtorrents/", "testtorrents/")
self.assertTrue(isinstance(tc, subprocess.Popen))
tc.terminate()
if __name__ == '__main__':
unittest.main()