1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #31517 -- Fixed HashedFilesMixin.hashed_name() if hash of the file is None.

This commit is contained in:
Richard Campen
2020-04-27 08:19:22 +12:00
committed by Mariusz Felisiak
parent 35f89d199c
commit 67b334fbaf
3 changed files with 15 additions and 2 deletions

View File

@@ -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