I think it should be noted in the Testing Your Model section of
http://docs.turbogears.org/1.0/Testing that testutil.DBTest provides
setUp() and tearDown() methods that create and drop (respectively) the
tables for your model.  That means that if you want to define your own
setUp/tearDown for tests in a class that inherits from testutil.DBTest
you either need to handle the creates/drops yourself, or do something
like:

def setUp(self):
    testutil.DBTest.setUp(self)
    # the rest of your setup code...

and the same sort of thing for tearDown.

You can see what I mean by simply adding do-nothing setUp/tearDown to
a testutil.DBTest test class:

def setUp(self):
    pass

def tearDown(self):
    pass

Test that previously passed will fail, complaining about non-existent
database tables.

Doug

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Docs" 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/turbogears-docs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to