1
0
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:
David Evans
2014-03-22 21:57:01 +00:00
committed by Tim Graham
parent 2460484486
commit ddcbde41ee
2 changed files with 8 additions and 2 deletions

View File

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