'Disable transaction methods, and clear some globals.'

def _pre_setup(self):

    cache.cache.clear()
    settings.TEMPLATE_DEBUG = settings.DEBUG = False
    test.testcases.disable_transaction_methods()
    self.client = self.client_class()
    self._urlconf_setup()
    mail.outbox = []
    from django.contrib.sites.models import Site
    Site.objects.clear_cache()
