summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Bordage <bordage.bertrand@gmail.com>2017-06-04 17:39:12 (GMT)
committerBertrand Bordage <bordage.bertrand@gmail.com>2017-06-04 17:39:12 (GMT)
commit95d291861267e414df92c373b0eee02519987298 (patch)
tree1629c4be56b368c1f24dedf459ca5869eba462fc
parentf82c48f391bb1cf23ed03463ea5d167f9821d305 (diff)
downloaddjango-cachalot-95d291861267e414df92c373b0eee02519987298.zip
django-cachalot-95d291861267e414df92c373b0eee02519987298.tar.gz
django-cachalot-95d291861267e414df92c373b0eee02519987298.tar.bz2
Fixes Python 2 tests.
-rw-r--r--cachalot/apps.py2
-rw-r--r--cachalot/tests/settings.py12
2 files changed, 8 insertions, 6 deletions
diff --git a/cachalot/apps.py b/cachalot/apps.py
index c0d122a..5e31b28 100644
--- a/cachalot/apps.py
+++ b/cachalot/apps.py
@@ -1,3 +1,5 @@
+from __future__ import unicode_literals
+
from django import VERSION as django_version
from django.apps import AppConfig
from django.conf import settings
diff --git a/cachalot/tests/settings.py b/cachalot/tests/settings.py
index eb2ab74..9c57f28 100644
--- a/cachalot/tests/settings.py
+++ b/cachalot/tests/settings.py
@@ -190,8 +190,8 @@ class SettingsTestCase(TestUtilsMixin, TransactionTestCase):
self.assertListEqual(errors, [])
warning001 = Warning(
- "Cache backend 'django.core.cache.backends.db.DatabaseCache' "
- "is not supported by django-cachalot.",
+ 'Cache backend %r is not supported by django-cachalot.'
+ % 'django.core.cache.backends.db.DatabaseCache',
hint='Switch to a supported cache backend '
'like Redis or Memcached.',
id='cachalot.W001')
@@ -223,8 +223,8 @@ class SettingsTestCase(TestUtilsMixin, TransactionTestCase):
id='cachalot.W002'
)
warning003 = Warning(
- "Database engine 'django.db.backends.oracle' is not supported "
- "by django-cachalot.",
+ 'Database engine %r is not supported by django-cachalot.'
+ % 'django.db.backends.oracle',
hint='Switch to a supported database engine.',
id='cachalot.W003'
)
@@ -235,8 +235,8 @@ class SettingsTestCase(TestUtilsMixin, TransactionTestCase):
id='cachalot.W004'
)
error001 = Error(
- "Database alias 'secondary' from `CACHALOT_DATABASES` "
- "is not defined in `DATABASES`.",
+ 'Database alias %r from `CACHALOT_DATABASES` '
+ 'is not defined in `DATABASES`.' % 'secondary',
hint='Change `CACHALOT_DATABASES` to be compliant with'
'`CACHALOT_DATABASES`',
id='cachalot.E001',