Exemplo n.º 1
0
 def test_get_next_link_value(self, mock_super):
     """Test the get next link method when super returns a value."""
     expected = 'http://localhost:8000/api/v1/providers/?offset=20'
     mock_super.return_value = expected
     paginator = StandardResultsSetPagination()
     paginator.request = Mock
     paginator.request.META = {}
     link = paginator.get_next_link()
     self.assertEqual(link, expected)
Exemplo n.º 2
0
 def test_get_next_link_none(self, mock_super):
     """Test the get next link method when super returns none."""
     paginator = StandardResultsSetPagination()
     link = paginator.get_next_link()
     self.assertIsNone(link)