So far my application isn't at a stage to do functional or even unit tests
of the controllers, but I do have a bunch of model objects and a little bit
of logic around them.

I read the little testing doc and it says that there is no support for
testing model objects.  I'm now trying to figure out what would be needed.

The way I've done SQLObject testing before was starting with a fresh
database each test and only creating the data that I needed for that
specific test.  It's slow, I know, but it's precise.

The problem, in the case of TurboGears, is the PackageHub.  All my objects
are created with PackageHub or AutoConnectionHub connections and I'd have
to change the connection for the different SQLObject classes any time I
wanted to use them.  Will I essentially be reimplementing
sqlobject.tests.setupClass and sqlobject.tests.InstalledTestDatabase to be
able to test my SQLObject classes through testgears?

Would I want to get around the PackageHub entirely or just run
turbogears.database.set_db_uri before importing any model objects?  I'd
still have to worry about creating the tables before the tests, but I'm
pretty sure I can get all that from the InstalledTestDatabase class.

One more quick question: is there an easy way to clear all tables without
running amuck of foreign key constraints?

Jason

-- 
If you understand, things are just as they are.  If you do not understand,
things are just as they are.

Attachment: pgpca3EPlOVcb.pgp
Description: PGP signature

Reply via email to