summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHonza Král <Honza.Kral@gmail.com>2013-02-23 14:16:37 -0800
committerHonza Král <Honza.Kral@gmail.com>2013-02-23 14:16:37 -0800
commit83ecb7b145644a1489db4137ac4d779bf1f294ca (patch)
treedc111c7db6798b93460a8e7ddec573e9bb034977 /tests
parent1c11ee63459c4362affbd6a20f2ddf9c2ecd8dce (diff)
parent32a7ab21482ef06f7e01a70fad8495f659c4d29f (diff)
Merge pull request #809 from asendecka/ticket19526
Fixed #19526 - make regexes for css case insensitive
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/staticfiles_tests/project/documents/cached/styles_insensitive.css1
-rw-r--r--tests/regressiontests/staticfiles_tests/tests.py8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/regressiontests/staticfiles_tests/project/documents/cached/styles_insensitive.css b/tests/regressiontests/staticfiles_tests/project/documents/cached/styles_insensitive.css
new file mode 100644
index 0000000000..57904ad415
--- /dev/null
+++ b/tests/regressiontests/staticfiles_tests/project/documents/cached/styles_insensitive.css
@@ -0,0 +1 @@
+@IMporT uRL("other.css"); \ No newline at end of file
diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py
index 35d5683a0c..555ea9f3d2 100644
--- a/tests/regressiontests/staticfiles_tests/tests.py
+++ b/tests/regressiontests/staticfiles_tests/tests.py
@@ -542,6 +542,14 @@ class TestCollectionCachedStorage(BaseCollectionTestCase,
cache_validator.validate_key(cache_key)
self.assertEqual(cache_key, 'staticfiles:821ea71ef36f95b3922a77f7364670e7')
+ def test_css_import_case_insensitive(self):
+ relpath = self.cached_file_path("cached/styles_insensitive.css")
+ self.assertEqual(relpath, "cached/styles_insensitive.2f0151cca872.css")
+ with storage.staticfiles_storage.open(relpath) as relfile:
+ content = relfile.read()
+ self.assertNotIn(b"cached/other.css", content)
+ self.assertIn(b"other.d41d8cd98f00.css", content)
+
# we set DEBUG to False here since the template tag wouldn't work otherwise
@override_settings(**dict(TEST_SETTINGS,