Commits

Lukas Linhart committed e8fd77f

Flush cache must not know about case

Comments (0)

Files changed (2)

djangosanetesting/cache.py

     try:
         cache.clear()
     except AttributeError:
-        # Django < 1.2, backports
+        # Django < 1.2, backport
         backend_name = cache.__module__.split(".")[-1:][0]
         
         if backend_name not in BACKEND_CLEAR_MAP:

djangosanetesting/noseplugins.py

         settings.ROOT_URLCONF = case._old_root_urlconf
         clear_url_caches()
 
-def flush_cache(case):
+def flush_cache():
     from django.contrib.contenttypes.models import ContentType
     ContentType.objects.clear_cache()
 
         if getattr(settings, "FLUSH_TEST_DATABASE_AFTER_INITIAL_SYNCDB", False):
             getattr(settings, "TEST_DATABASE_FLUSH_COMMAND", flush_database)(self)
 
+        flush_cache()
+
         self.need_flush = False
     
     def finalize(self, *args, **kwargs):
             transaction.leave_transaction_management()
 
         flush_urlconf(self)
-        flush_cache(self)
+        flush_cache()
         
 class DjangoTranslationPlugin(Plugin):
     """