Refs #23919 -- Removed six.PY2/PY3 usage

Thanks Tim Graham for the review.
This commit is contained in:
Claude Paroz 2016-12-01 11:38:01 +01:00
parent e63d98b7be
commit c716fe8782
111 changed files with 305 additions and 1296 deletions

View file

@ -1,7 +1,6 @@
from django.core.exceptions import ImproperlyConfigured
from django.db.utils import load_backend
from django.test import SimpleTestCase
from django.utils import six
class TestLoadBackend(SimpleTestCase):
@ -10,7 +9,7 @@ class TestLoadBackend(SimpleTestCase):
"'foo' isn't an available database backend.\n"
"Try using 'django.db.backends.XXX', where XXX is one of:\n"
" 'mysql', 'oracle', 'postgresql', 'sqlite3'\n"
"Error was: No module named %s"
) % "foo.base" if six.PY2 else "'foo'"
"Error was: No module named 'foo'"
)
with self.assertRaisesMessage(ImproperlyConfigured, msg):
load_backend('foo')