[Grok-dev] testing and *rdb*

Kapil Thangavelu kapil.foss at gmail.com
Wed Jul 16 17:32:50 EDT 2008

On Sat, Jul 12, 2008 at 6:05 PM, Toni Mueller <support at oeko.net> wrote:

> Hi,
> while trying to write some tests for my RDB using application, I found
> that I'd like to enforce the specification of the DSN using a TEST_DSN
> environment variable, to prevent the unwitting user (eg. me) from
> inadvertantly erasing their production database. It was easy to enforce
> this, but the side effect is that tests may no longer be run
> unattended, since something that would run eg. all tests for all
> packages contained in a certain directory tree (think of eg. BSD's
> "make build"), would not know how to set up the test database. I also
> can't simply assume that the test database is SQLite, which is far too
> old on my system, but instead have to assume a full PostgreSQL right
> now, but that can't be automagically configured.
> What's the recommended way to solve this dilemma, please?

i tend to configure the db connections with ... zcml.. and just have a
separate zcml string pointing to a test db for the unit test harness.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20080716/52aafaee/attachment.html

More information about the Grok-dev mailing list