mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.7.x] Fixed #22315 -- str/bytes mismatch in staticfiles
Previously, `ManifestFilesMixin.read_manifest` failed in Python 3
because `json.loads` accepts `str` not `bytes`.
Backport of 86dcac4634 from master
This commit is contained in:
@@ -662,6 +662,11 @@ class TestCollectionManifestStorage(TestHashedFiles, BaseCollectionTestCase,
|
||||
storage.staticfiles_storage.manifest_version,
|
||||
force_text(manifest_content))
|
||||
|
||||
def test_parse_cache(self):
|
||||
hashed_files = storage.staticfiles_storage.hashed_files
|
||||
manifest = storage.staticfiles_storage.load_manifest()
|
||||
self.assertEqual(hashed_files, manifest)
|
||||
|
||||
|
||||
# we set DEBUG to False here since the template tag wouldn't work otherwise
|
||||
@override_settings(**dict(
|
||||
|
||||
Reference in New Issue
Block a user