From 82292141a07b9860add18c42b50ad98610a8250d Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Wed, 25 Jul 2012 09:57:00 +0200 Subject: [PATCH] Made staticfiles tests independent of test execution order. --- tests/regressiontests/staticfiles_tests/tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py index e05729cf7f..2c038e1713 100644 --- a/tests/regressiontests/staticfiles_tests/tests.py +++ b/tests/regressiontests/staticfiles_tests/tests.py @@ -54,6 +54,9 @@ class BaseStaticFilesTestCase(object): # since we're planning on changing that we need to clear out the cache. default_storage._wrapped = empty storage.staticfiles_storage._wrapped = empty + # Clear the cached staticfile finders, so they are reinitialized every + # run and pick up changes in settings.STATICFILES_DIRS. + finders._finders.clear() testfiles_path = os.path.join(TEST_ROOT, 'apps', 'test', 'static', 'test') # To make sure SVN doesn't hangs itself with the non-ASCII characters