summaryrefslogtreecommitdiff
path: root/tests/dbshell
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-12-01 11:38:01 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 16:21:28 +0100
commitc716fe87821df00f9f03ecc761c914d1682591a2 (patch)
tree0436706cdb190acbc76fb5fcf6d66f16e09fafa3 /tests/dbshell
parente63d98b7beb16d1410168a2315cbe04c43c9c80d (diff)
Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
Diffstat (limited to 'tests/dbshell')
-rw-r--r--tests/dbshell/test_postgresql_psycopg2.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/dbshell/test_postgresql_psycopg2.py b/tests/dbshell/test_postgresql_psycopg2.py
index 4c4a1ae25e..755464b3bb 100644
--- a/tests/dbshell/test_postgresql_psycopg2.py
+++ b/tests/dbshell/test_postgresql_psycopg2.py
@@ -3,7 +3,6 @@ import os
from django.db.backends.postgresql.client import DatabaseClient
from django.test import SimpleTestCase, mock
-from django.utils import six
from django.utils.encoding import force_bytes, force_str
@@ -91,16 +90,12 @@ class PostgreSqlDbshellCommandTestCase(SimpleTestCase):
encoding = locale.getpreferredencoding()
username = 'rôle'
password = 'sésame'
- try:
- username_str = force_str(username, encoding)
- password_str = force_str(password, encoding)
- pgpass_bytes = force_bytes(
- 'somehost:444:dbname:%s:%s' % (username, password),
- encoding=encoding,
- )
- except UnicodeEncodeError:
- if six.PY2:
- self.skipTest("Your locale can't run this test.")
+ username_str = force_str(username, encoding)
+ password_str = force_str(password, encoding)
+ pgpass_bytes = force_bytes(
+ 'somehost:444:dbname:%s:%s' % (username, password),
+ encoding=encoding,
+ )
self.assertEqual(
self._run_it({
'database': 'dbname',