While running tests in a different order, got some failures in SUMO. A locale activation had leaked out somehow (middleware failure?). At any rate, the test harness should start this from a known-good state. (It's not worth introducing even a soft dependency on tower for this.)
This saves 700 queries before the tests are even run: truncation of tables and population of content_type and auth_permission. To force a flush after your schema has changed, define FORCE_DB. FORCE_DB no longer implies a drop of the DB after the test run. That DB is perfectly good; we can reuse it next time.
…n where one DB is MySQL. Also, factor out the knowledge about how to tell if a connection is to a MySQL DB.
…Case, and make TestCase a thin wrapper around it. Anybody who uses TestCase should go fast for free.
…your tests go 2-3 times as fast. By loading fixtures only once per test class and using DB transaction machinery to restore them between tests, FixtureReusingTestCase brought SUMO's 1060 tests from 302 seconds down to 93. It also uses these tricks: * Truncate only the tables which actually had fixture data loaded into them. Truncate always drops and re-adds the table, even if it's empty, a nontrivial piece of I/O. This brings a 199s test run down to 97s. * Quit opening and closing connections all the time. This saves 4 more seconds.
…ss it to add wsgi.input.
…rform cleanup (bug 560541)