Randall wrote:
> Finally, I tried a nasty hack.  The method I'm calling has no template
> so this:
>
>     testutil.create_request(url)
>
> gives me access to cherrypy.request.body[0], which contains the methods
> return value in a string, which I can parse.  Workable, but I still
> have a problem.  My input values are not getting through.  If I call
> this url.
>
>     url = '/page_list?tg_paginate_limit=11'
>
> tg_paginate_limit is present in cherrypy.request.params, but is not
> available as a keyword in the "decorated" function of paginate.py (line
> 16).  I know it is available in a real application because I've written
> some, but for some reason using testutil.create_request doesn't seem to
> behave as expected.

I put my test controller into a new quickstarted project while
troubleshooting the above and the quickstarted project worked fine.
args and kw was available on paginate.py line 16.  Any hints as to why
this doesn't work with testutil.create_request?  It must be doing
something differently.

The test controller is very simple:

class MyRoot(tg.controllers.RootController):

    def index(self):
        return dict()

    def page_list(self):
        products = makeTestData()
        return dict(products=products)
    page_list = tg.paginate('products', limit=5)(page_list)
    page_list = tg.expose()(page_list)

makeTestData just returns a list of tuples to work with.

Randall


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to