Depends on which TestCase you are using, and the combinations in which
you are using them.
django.test.TestCase does a full database flush at the start of each
new test. This means that you don't need to manually delete objects in
tearDown - the next test setUp will make sure the database is clean.
doctests and unittest.TestCase do no database preparations. At the
start of a test, the database will be in whatever state the previous
test left. This could mean some stray data which could cause testing
conflicts if you are not careful, so a cleanup might be good practice.
Yours,
Russ Magee %-)
Using unittest.TestCase I do this in setUp(), rather than tearDown, so I
know the test starts with a clean table.
Kent