summaryrefslogtreecommitdiff
path: root/tests/regressiontests/staticfiles_tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-05-03 18:19:18 +0200
committerClaude Paroz <claude@2xlibre.net>2012-05-03 18:30:07 +0200
commit10cf3c64273db407402ea9723569dfc8d059e186 (patch)
tree09278a014019f628169ec4774a3ad6fb13650fb4 /tests/regressiontests/staticfiles_tests
parente9a56606e738c478373d052bbd876ff84afdb995 (diff)
Used catch_warnings instead of save/restore methods. Refs #17049.
Diffstat (limited to 'tests/regressiontests/staticfiles_tests')
-rw-r--r--tests/regressiontests/staticfiles_tests/tests.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/tests/regressiontests/staticfiles_tests/tests.py b/tests/regressiontests/staticfiles_tests/tests.py
index 6914128989..7f30cb987a 100644
--- a/tests/regressiontests/staticfiles_tests/tests.py
+++ b/tests/regressiontests/staticfiles_tests/tests.py
@@ -6,7 +6,6 @@ import posixpath
import shutil
import sys
import tempfile
-import warnings
from StringIO import StringIO
from django.template import loader, Context
@@ -511,11 +510,8 @@ class TestCollectionCachedStorage(BaseCollectionTestCase,
"""
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/" + chr(22) + chr(180)
cache_key = storage.staticfiles_storage.cache_key(name)
- self.save_warnings_state()
cache_validator = BaseCache({})
- warnings.filterwarnings('error', category=CacheKeyWarning)
cache_validator.validate_key(cache_key)
- self.restore_warnings_state()
self.assertEqual(cache_key, 'staticfiles:e95bbc36387084582df2a70750d7b351')