'Performs any pre-test setup. This includes:
* If the class has an \'available_apps\' attribute, restricting the app
cache to these applications, then firing post_syncdb -- it must run
with the correct set of applications for the test case.
* If the class has a \'fixtures\' attribute, installing these fixtures.'

def _pre_setup(self):

    super(TransactionTestCase, self)._pre_setup()
    if (self.available_apps is not None):
        cache.set_available_apps(self.available_apps)
        for db_name in self._databases_names(include_mirrors=False):
            flush.Command.emit_post_syncdb(verbosity=0, interactive=False, database=db_name)
    try:
        self._fixture_setup()
    except Exception:
        if (self.available_apps is not None):
            cache.unset_available_apps()
        raise
