On 4/1/07, Toby Sargeant <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to pylons, so this might be a lack of understanding > issue, but I've looked around the docs and haven't really found > anything. > > I'm trying to write a test suite for my model. tests/test_models.py > looks like the place to do it, but there's no stub code. Not knowing > if it was meant to be run as a script, or through paste, I decided to > try as a script, and borrowed the preamble from websetup.py to get the > config/sqlalchemy metadata initialized. > > This is all well and good, but the model relies on lib/app_globals.py > to setup some config information for it via 'g'. Tracing it through, I > see that g gets set up in the WSGI middleware, which clearly isn't > being run in the script case. > > I'm stumped as to how to set this up properly, and any suggestions/ > pointers would be much appreciated.
I may be wrong, but I'm guessing this is one of those "Pylons is a framework that lets you do whatever you want" situations. Just make it up! ;) Happy Hacking! -jj -- http://jjinux.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
