Files
feedcrawler/testenv/tests/feed/test_torrent_deamon.py
2014-09-23 23:25:25 +02:00

37 lines
1.1 KiB
Python

__author__ = 'dev'
import unittest
from feed.feed import Feed
from feed.torrent_daemon_entry_handler import TorrentDaemonEntryHandler
class TestTorrentDaemonEntryHandler(unittest.TestCase):
def setUp(self):
self.__feed = Feed("sbk", "podcast", "application/x-bittorrent", "testfeeds/podcast/sbk/sbk.xml")
self.__test_torrent = "http://bitlove.org/nitramred/staatsbuergerkunde-mp3/SBK028_Arbeit.mp3.torrent"
self.__tdeh = TorrentDaemonEntryHandler(self.__feed)
self.__tdeh.start_daemon()
def tearDown(self):
self.__tdeh.stop_daemon()
def test_start_daemon(self):
self.assertTrue(self.__tdeh.is_running_daemon())
def test_stop_daemon(self):
self.__tdeh.stop_daemon()
self.assertFalse(self.__tdeh.is_running_daemon())
def test_is_running_daemon(self):
self.assertTrue(self.__tdeh.is_running_daemon())
self.__tdeh.stop_daemon()
self.assertFalse(self.__tdeh.is_running_daemon())
def test_start_torrent(self):
self.assertTrue(False)
def test_add_torrent_to_daemon(self):
self.assertTrue(False)
if __name__ == '__main__':
unittest.main()