summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2011-12-27 08:22:55 +0000
committerAymeric Augustin <aymeric.augustin@m4x.org>2011-12-27 08:22:55 +0000
commite8a6fee6e66f9745e2580b329c93e369801a8318 (patch)
tree6cdb93b6f0333ca5f3ef9ea84d2ee58096ff629f /tests
parentb04578372930431827019a821ff946b36db3256d (diff)
Fixed a CacheKeyWarning under Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/cache/tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/regressiontests/cache/tests.py b/tests/regressiontests/cache/tests.py
index 779e3fedf8..8faaa6fdc4 100644
--- a/tests/regressiontests/cache/tests.py
+++ b/tests/regressiontests/cache/tests.py
@@ -1270,7 +1270,7 @@ class CacheI18nTest(TestCase):
@override_settings(USE_I18N=False, USE_L10N=False, USE_TZ=True)
def test_cache_key_i18n_timezone(self):
request = self._get_request()
- tz = timezone.get_current_timezone_name()
+ tz = timezone.get_current_timezone_name().replace(' ', '_')
response = HttpResponse()
key = learn_cache_key(request, response)
self.assertIn(tz, key, "Cache keys should include the time zone name when time zones are active")
@@ -1281,7 +1281,7 @@ class CacheI18nTest(TestCase):
def test_cache_key_no_i18n (self):
request = self._get_request()
lang = translation.get_language()
- tz = timezone.get_current_timezone_name()
+ tz = timezone.get_current_timezone_name().replace(' ', '_')
response = HttpResponse()
key = learn_cache_key(request, response)
self.assertNotIn(lang, key, "Cache keys shouldn't include the language name when i18n isn't active")