From 0b57efe014a360e7dcf36e897148a12c230a1247 Mon Sep 17 00:00:00 2001 From: "M@ Hardcastle" Date: Thu, 11 Aug 2016 20:31:08 -0700 Subject: [PATCH] Add test to ensure blank parameters are preserved in next link --- tests/test_pagination.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_pagination.py b/tests/test_pagination.py index f7feb40069..3d1eb9b47d 100644 --- a/tests/test_pagination.py +++ b/tests/test_pagination.py @@ -108,6 +108,17 @@ def test_additional_query_params_are_preserved(self): 'count': 50 } + def test_additional_blank_query_params_are_preserved(self): + request = factory.get('/?foobar&page=2') + response = self.view(request) + assert response.status_code == status.HTTP_200_OK + assert response.data == { + 'results': [12, 14, 16, 18, 20], + 'previous': 'http://testserver/?foobar', + 'next': 'http://testserver/?foobar&page=3', + 'count': 50 + } + def test_404_not_found_for_zero_page(self): request = factory.get('/', {'page': '0'}) response = self.view(request) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy