def test_paged_api_url_generation(self): pager = dreamfilm._paged_api_url(type='list', q="Bad santa", sort="alpha") page1 = 'http://www.dreamfilmhd.org/API/api.php?type=list&offset=25&limit=25&q=Bad%20santa&sort=alpha' page2 = 'http://www.dreamfilmhd.org/API/api.php?type=list&offset=50&limit=25&q=Bad%20santa&sort=alpha' self.assertEqual(pager(1), page1) self.assertEqual(pager(2), page2)
def test_paged_api_url_generation(self): pager = dreamfilm._paged_api_url(type='list', q="Bad santa", sort="alpha") page1 = 'http://www.dreamfilmhd.org/API/api.php?type=list&offset=25&limit=25&q=Bad%20santa&sort=alpha' page2 = 'http://www.dreamfilmhd.org/API/api.php?type=list&offset=50&limit=25&q=Bad%20santa&sort=alpha' self.assertEqual(pager(1), page1) self.assertEqual(pager(2), page2)