mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #17806 -- Fixed off-by-n error in the CachedStaticFilesStorage that prevented it from finding files in nested directories. Many thanks to lpetre.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -416,11 +416,12 @@ class TestCollectionCachedStorage(BaseCollectionTestCase,
|
||||
|
||||
def test_template_tag_absolute(self):
|
||||
relpath = self.cached_file_path("cached/absolute.css")
|
||||
self.assertEqual(relpath, "cached/absolute.cc80cb5e2eb1.css")
|
||||
self.assertEqual(relpath, "cached/absolute.23f087ad823a.css")
|
||||
with storage.staticfiles_storage.open(relpath) as relfile:
|
||||
content = relfile.read()
|
||||
self.assertNotIn("/static/cached/styles.css", content)
|
||||
self.assertIn("/static/cached/styles.93b1147e8552.css", content)
|
||||
self.assertIn('/static/cached/img/relative.acae32e4532b.png', content)
|
||||
|
||||
def test_template_tag_denorm(self):
|
||||
relpath = self.cached_file_path("cached/denorm.css")
|
||||
|
||||
Reference in New Issue
Block a user