summaryrefslogtreecommitdiff
path: root/tests/staticfiles_tests/test_storage.py
diff options
context:
space:
mode:
authorRichard Campen <richard@campen.co>2020-04-27 08:19:22 +1200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-04-28 08:25:07 +0200
commit67b334fbaf7cfb0936666ea788d406a55a09754c (patch)
treec718dcec7c48df627c15fce6197435d2a8ec001d /tests/staticfiles_tests/test_storage.py
parent35f89d199c94ebc72b06d5c44077401aa2eae47f (diff)
Fixed #31517 -- Fixed HashedFilesMixin.hashed_name() if hash of the file is None.
Diffstat (limited to 'tests/staticfiles_tests/test_storage.py')
-rw-r--r--tests/staticfiles_tests/test_storage.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/staticfiles_tests/test_storage.py b/tests/staticfiles_tests/test_storage.py
index c6f6e4fb4e..02704fcbe8 100644
--- a/tests/staticfiles_tests/test_storage.py
+++ b/tests/staticfiles_tests/test_storage.py
@@ -386,6 +386,15 @@ class TestCollectionManifestStorage(TestHashedFiles, CollectionTestCase):
)
+@override_settings(STATICFILES_STORAGE='staticfiles_tests.storage.NoneHashStorage')
+class TestCollectionNoneHashStorage(CollectionTestCase):
+ hashed_file_path = hashed_file_path
+
+ def test_hashed_name(self):
+ relpath = self.hashed_file_path('cached/styles.css')
+ self.assertEqual(relpath, 'cached/styles.css')
+
+
@override_settings(STATICFILES_STORAGE='staticfiles_tests.storage.SimpleStorage')
class TestCollectionSimpleStorage(CollectionTestCase):
hashed_file_path = hashed_file_path