import platform
if platfom.node() == "YOUR_PRODUCTION_BOX":
    db.connect(PRODUCTION_SETTINGS)
else:
    db.connect(TEST_SETTINGS)


I like this method because it allows me to toggle other things as well, such
as debug.


On Fri, Sep 18, 2009 at 5:59 PM, Sean <r.sean.bow...@gmail.com> wrote:

>
> Hi,
>
> I'm trying to test my web.py app, including its database
> functionality.  I would like to use a test database for this purpose,
> but it seems like the standard web.py way of doing things is to
> hardcode the database connection in something like a config.py file.
>
> What's the best way to test a web.py app, including its database?  How
> do others do this?
>
> Thanks!
> Sean
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to webpy@googlegroups.com
To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to