예제 #1
0
파일: tests.py 프로젝트: chenjunqiang/TPB
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))
예제 #2
0
파일: tests.py 프로젝트: themylogin/TPB
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))
예제 #3
0
파일: tests.py 프로젝트: chenjunqiang/TPB
 def setUp(self):
     self.tpb = TPB(self.url)
예제 #4
0
파일: tests.py 프로젝트: themylogin/TPB
 def setUp(self):
     self.tpb = TPB(self.url)