summaryrefslogtreecommitdiff
path: root/tests/staticfiles_tests
diff options
context:
space:
mode:
authorSztrovacsek <hanna.kollo@gmail.com>2015-03-07 14:15:26 +0100
committerTim Graham <timograham@gmail.com>2015-03-07 10:47:07 -0500
commit87d78241a2fc85e5715fb51c554fe06e91deee58 (patch)
tree3fcf021dd97584ae53ce95c5d5cefa7f3c72083d /tests/staticfiles_tests
parent90b069c33f3f8785a7d068a2032f130d2dbb0c75 (diff)
Fixed #23986 -- Fixed collectstatic --clear failure if STATIC_ROOT dir doesn't exist.
Diffstat (limited to 'tests/staticfiles_tests')
-rw-r--r--tests/staticfiles_tests/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/staticfiles_tests/tests.py b/tests/staticfiles_tests/tests.py
index c65187d132..9cfabecbb2 100644
--- a/tests/staticfiles_tests/tests.py
+++ b/tests/staticfiles_tests/tests.py
@@ -301,6 +301,10 @@ class TestCollectionClear(CollectionTestCase):
def test_cleared_not_found(self):
self.assertFileNotFound('cleared.txt')
+ def test_dir_not_exists(self, **kwargs):
+ shutil.rmtree(settings.STATIC_ROOT)
+ super(TestCollectionClear, self).run_collectstatic(clear=True)
+
class TestCollectionExcludeNoDefaultIgnore(CollectionTestCase, TestDefaults):
"""