def METHOD_NAME(pyramid_request):
    pyramid_request.GET = MultiDict(pyramid_request.GET)
    pyramid_request.GET["foo"] = "bar"
    url = pretend.stub()
    pyramid_request.current_route_path = pretend.call_recorder(lambda _query: url)
    url_maker = paginate.paginate_url_factory(pyramid_request)
    assert url_maker(5) is url
    assert pyramid_request.current_route_path.calls == [
        pretend.call(_query=[("foo", "bar"), ("page", 5)])
    ]