Make TransactionTestCase flush tables after test run instead of before
|Reported by:||Andreas Pelme||Owned by:||nobody|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
TransactionTestCase does not clean up after a test is run. When the next TransactionTestCase is run, tables are flushed and fixtures are loaded.
It would be better if the flush took place in _post_teardown, which would leave the database in a clean state after each test. Then test order does not matter, TransactionTestCase and TestCases can be executed in arbitrary order.
There is a related ticket #12408 to reorder doctests to also run before TransactionTestCase. If TransactionTestCase is changed, no reordering will be necessary.
django-developers discussion: http://groups.google.com/group/django-developers/browse_thread/thread/3df2b4926eba08d2?hl=en