diff options
| author | Jannis Leidel <jannis@leidel.info> | 2012-03-13 03:48:03 +0000 |
|---|---|---|
| committer | Jannis Leidel <jannis@leidel.info> | 2012-03-13 03:48:03 +0000 |
| commit | 7487c74020f97829e466c7efbdf7bd9e5fa90b1b (patch) | |
| tree | 4adb2f7367f5b9832e78fee5a370db136f6f76f9 /tests | |
| parent | d174216587197dcc6c4c9abcacb8e428a1f078bf (diff) | |
Fixed #17865 -- Strip whitespaces from the paths when using the CachedStaticFilesStorage backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/staticfiles_tests/project/documents/cached/denorm.css | 3 | ||||
| -rw-r--r-- | tests/regressiontests/staticfiles_tests/tests.py | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/regressiontests/staticfiles_tests/project/documents/cached/denorm.css b/tests/regressiontests/staticfiles_tests/project/documents/cached/denorm.css index 27b9a349b0..d6567b00dd 100644 --- a/tests/regressiontests/staticfiles_tests/project/documents/cached/denorm.css +++ b/tests/regressiontests/staticfiles_tests/project/documents/cached/denorm.css @@ -1 +1,4 @@ @import url("..//cached///styles.css"); +body { + background: #d3d6d8 url(img/relative.png ); +} diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py index 7850b44b77..38075643a0 100644 --- a/tests/regressiontests/staticfiles_tests/tests.py +++ b/tests/regressiontests/staticfiles_tests/tests.py @@ -427,11 +427,13 @@ class TestCollectionCachedStorage(BaseCollectionTestCase, def test_template_tag_denorm(self): relpath = self.cached_file_path("cached/denorm.css") - self.assertEqual(relpath, "cached/denorm.363de96e9b4b.css") + self.assertEqual(relpath, "cached/denorm.c5bd139ad821.css") with storage.staticfiles_storage.open(relpath) as relfile: content = relfile.read() self.assertNotIn("..//cached///styles.css", content) self.assertIn("/static/cached/styles.93b1147e8552.css", content) + self.assertNotIn("url(img/relative.png )", content) + self.assertIn("/static/cached/img/relative.acae32e4532b.png", content) def test_template_tag_relative(self): relpath = self.cached_file_path("cached/relative.css") |
