Exemplo n.º 1
0
class TPBTestCase(RemoteTestCase):
    def setUp(self):
        self.tpb = TPB(self.url)

    def test_search(self):
        kwargs = {'query': 'breaking bad', 'page': 5, 'order': 9, 'category': 100}
        a_search = self.tpb.search(**kwargs)
        b_search = Search(self.url, **kwargs)
        self.assertTrue(isinstance(a_search, Search))
        self.assertTrue(isinstance(b_search, Search))
        self.assertEqual(str(a_search.url), str(b_search.url))

    def test_recent(self):
        kwargs = {'page': 5}
        a_recent = self.tpb.recent(**kwargs)
        b_recent = Recent(self.url, **kwargs)
        self.assertTrue(isinstance(a_recent, Recent))
        self.assertTrue(isinstance(b_recent, Recent))
        self.assertEqual(str(a_recent.url), str(b_recent.url))

    def test_top(self):
        kwargs = {'category': 100}
        a_top = self.tpb.top(**kwargs)
        b_top = Top(self.url, **kwargs)
        self.assertTrue(isinstance(a_top, Top))
        self.assertTrue(isinstance(b_top, Top))
        self.assertEqual(str(a_top.url), str(b_top.url))
Exemplo n.º 2
0
class TPBTestCase(RemoteTestCase):

    def setUp(self):
        self.tpb = TPB(self.url)

    def test_search(self):
        kwargs = {'query': 'tpb afk', 'page': 5, 'order': 9, 'category': 100}
        a_search = self.tpb.search(**kwargs)
        b_search = Search(self.url, **kwargs)
        self.assertTrue(isinstance(a_search, Search))
        self.assertTrue(isinstance(b_search, Search))
        self.assertEqual(str(a_search.url), str(b_search.url))

    def test_recent(self):
        kwargs = {'page': 5}
        a_recent = self.tpb.recent(**kwargs)
        b_recent = Recent(self.url, **kwargs)
        self.assertTrue(isinstance(a_recent, Recent))
        self.assertTrue(isinstance(b_recent, Recent))
        self.assertEqual(str(a_recent.url), str(b_recent.url))

    def test_top(self):
        kwargs = {'category': 100}
        a_top = self.tpb.top(**kwargs)
        b_top = Top(self.url, **kwargs)
        self.assertTrue(isinstance(a_top, Top))
        self.assertTrue(isinstance(b_top, Top))
        self.assertEqual(str(a_top.url), str(b_top.url))
Exemplo n.º 3
0
 def setUp(self):
     self.tpb = TPB(self.url)
Exemplo n.º 4
0
 def setUp(self):
     self.tpb = TPB(self.url)