Exemplo n.º 1
0
Arquivo: test.py Projeto: 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)
Exemplo n.º 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)
Exemplo n.º 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
Exemplo n.º 4
0
Arquivo: test.py Projeto: rafallo/p2c
 def setUp(self):
     self.service = TPBService()
Exemplo n.º 5
0
 def setUp(self):
     self.service = TPBService()