def test_invalid(self): url = self.url + '?cal_next=nann' req = self.factory.get(url) net = get_net(req) self.assertEqual(net, 0)
def test_valid_next_and_prev(self): url = self.url + '?cal_next=1&cal_prev=2' req = self.factory.get(url) net = get_net(req) self.assertEqual(net, -1)
def test_valid_next(self): url = self.url + '?cal_next=1' req = self.factory.get(url) net = get_net(req) self.assertEqual(net, 1)