def test_paginated_url():
 url = urlparams(reverse('search'), q='bookmarks', page=2)
 request = RequestFactory().get(url)
 queryset = [{}, {}]
 paginated = paginate(request, queryset)
 eq_(paginated.url, (request.build_absolute_uri(request.path) + '?q=bookmarks'))

def test_paginated_url ( ) : url = urlparams ( reverse ( 'search' ) , q = 'bookmarks' , page = 2 ) request = RequestFactory ( ) . get ( url ) queryset = [ { } , { } ] paginated = paginate ( request , queryset ) eq_ ( paginated . url , ( request . build_absolute_uri ( request . path ) + '?q=bookmarks' ) )
avoid duplicating page param in pagination .