summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-08-14 17:24:31 +0200
committerClaude Paroz <claude@2xlibre.net>2012-08-14 17:24:31 +0200
commit7d48e077b573afb4184301be6565a88e8a9b6e28 (patch)
tree3bc5b9adb2fa82269a988bf027508a50e9490f19 /tests
parent9cb80356fc4cff7b8ecda91877755d6e361667c4 (diff)
[py3] Fixed staticfiles tests
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/staticfiles_tests/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py
index d68f211535..515b7c3a53 100644
--- a/tests/regressiontests/staticfiles_tests/tests.py
+++ b/tests/regressiontests/staticfiles_tests/tests.py
@@ -527,11 +527,11 @@ class TestCollectionCachedStorage(BaseCollectionTestCase,
"""
Handle cache key creation correctly, see #17861.
"""
- name = b"/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/" + chr(22) + chr(180)
+ name = "/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/long filename/ with spaces Here and ?#%#$/other/stuff/some crazy/" + "\x16" + "\xb4"
cache_key = storage.staticfiles_storage.cache_key(name)
cache_validator = BaseCache({})
cache_validator.validate_key(cache_key)
- self.assertEqual(cache_key, 'staticfiles:e95bbc36387084582df2a70750d7b351')
+ self.assertEqual(cache_key, 'staticfiles:821ea71ef36f95b3922a77f7364670e7')
# we set DEBUG to False here since the template tag wouldn't work otherwise
@@ -569,8 +569,8 @@ class TestCollectionSimpleCachedStorage(BaseCollectionTestCase,
self.assertEqual(relpath, "cached/styles.deploy12345.css")
with storage.staticfiles_storage.open(relpath) as relfile:
content = relfile.read()
- self.assertNotIn("cached/other.css", content)
- self.assertIn("other.deploy12345.css", content)
+ self.assertNotIn(b"cached/other.css", content)
+ self.assertIn(b"other.deploy12345.css", content)
if sys.platform != 'win32':