Example #1
0
File: test.py Project: rafallo/p2c
class TPBServiceTestCase(TestCase):
    def setUp(self):
        self.service = TPBService()

    def test_get_categories(self):
        categories = self.service.get_categories()
        self.assertIsInstance(categories, list)

    def test_get_torrents(self):
        first_category = self.service.get_categories()[0]
        torrents = self.service.get_torrents_list(first_category)
        self.assertIsInstance(torrents, list)
        for torrent in torrents:
            self.assertIsInstance(torrent, TorrentInfo)
Example #2
0
class TPBServiceTestCase(TestCase):
    def setUp(self):
        self.service = TPBService()

    def test_get_categories(self):
        categories = self.service.get_categories()
        self.assertIsInstance(categories, list)

    def test_get_torrents(self):
        first_category = self.service.get_categories()[0]
        torrents = self.service.get_torrents_list(first_category)
        self.assertIsInstance(torrents, list)
        for torrent in torrents:
            self.assertIsInstance(torrent, TorrentInfo)
Example #3
0
    def __init__(self):
        self.manager = FileManager()
        self.services = [
            LegitTorrentsService(),
            KickAssService(),
            TPBService()
        ]
        #        self.services = [LegitTorrentsService()]
        self._init_session()

        threading.Thread(target=self._prefill_cache).start()

        self._playing = None
Example #4
0
File: test.py Project: rafallo/p2c
 def setUp(self):
     self.service = TPBService()
Example #5
0
 def setUp(self):
     self.service = TPBService()