diff --git a/beat/web/common/testutils.py b/beat/web/common/testutils.py index 286ff29f178e6bd468f30be9810bb64587032ff7..ccb7683ec022185659787b84003a3d07c80502f5 100644 --- a/beat/web/common/testutils.py +++ b/beat/web/common/testutils.py @@ -25,7 +25,11 @@ # # ############################################################################### +import os +import shutil + from django.test import TestCase +from django.conf import settings from urlparse import urlparse @@ -38,6 +42,15 @@ class BaseTestCase(TestCase): class Meta: model = None + + def tearDown(): + + if os.path.exists(settings.CACHE_ROOT): + shutil.rmtree(settings.CACHE_ROOT) + if os.path.exists(settings.PREFIX): + shutil.rmtree(settings.PREFIX) + + def checkObjectDBSharingPreferences(self, contribution, reference): if not(reference.has_key('status')): reference['status'] = 'private'