The most straightforward way to execute a view as it would be executed
if a real request were to come in is to use the technique described in
http://docs.pylonsproject.org/projects/pyramid/1.0/narr/testing.html#creating-functional-tests
If that seems unreasonable, probably you'll want to modify your
requirements. Your view code has the logic you want to execute right
now, but if you want to call it programmatically, you should likely
factor the bits of it out that need to be called outside of the context
of an actual request and just call the refactored function from within
your cron-executed script.
- C
Are you using Paster? If so, "paster request" and "paster post" are
probably what you're looking for.
-r
No real reason to use DummyRequest there (it's a bit strange in
general). I'd probably just use pyramid.request.Request.
- C