summaryrefslogtreecommitdiff
path: root/tests/regressiontests/staticfiles_tests
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2012-03-02 11:29:14 +0000
committerJannis Leidel <jannis@leidel.info>2012-03-02 11:29:14 +0000
commite88a65660f8d114b8c5e8670f228af7f4bdd81a0 (patch)
treed3f6fe2c0cc91799a38503ef9be8d7b4d6237c62 /tests/regressiontests/staticfiles_tests
parent746987f916bfb24a0671429d9993ad727dc7c8bc (diff)
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
Diffstat (limited to 'tests/regressiontests/staticfiles_tests')
-rw-r--r--tests/regressiontests/staticfiles_tests/project/documents/cached/absolute.css3
-rw-r--r--tests/regressiontests/staticfiles_tests/tests.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/tests/regressiontests/staticfiles_tests/project/documents/cached/absolute.css b/tests/regressiontests/staticfiles_tests/project/documents/cached/absolute.css
index e64e7ccca7..54467a362d 100644
--- a/tests/regressiontests/staticfiles_tests/project/documents/cached/absolute.css
+++ b/tests/regressiontests/staticfiles_tests/project/documents/cached/absolute.css
@@ -1 +1,4 @@
@import url("/static/cached/styles.css");
+body {
+ background: #d3d6d8 url(/static/cached/img/relative.png);
+} \ No newline at end of file
diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py
index 5c8748ef2c..050ba0e9e9 100644
--- a/tests/regressiontests/staticfiles_tests/tests.py
+++ b/tests/regressiontests/staticfiles_tests/tests.py
@@ -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")