Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.2.X] Added a regression test for r14781.

Backport of r14783 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 99b5526c19841abb398364947d04460f743dc216 1 parent 57e5ccb
Ian Kelly ikelly authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 tests/regressiontests/backends/tests.py
13 tests/regressiontests/backends/tests.py
View
@@ -11,7 +11,7 @@
import models
-class Callproc(unittest.TestCase):
+class OracleChecks(unittest.TestCase):
def test_dbms_session(self):
# If the backend is Oracle, test that we can call a standard
@@ -34,9 +34,6 @@ def test_cursor_var(self):
cursor.execute("BEGIN %s := 'X'; END; ", [var])
self.assertEqual(var.getvalue(), 'X')
-
-class LongString(unittest.TestCase):
-
def test_long_string(self):
# If the backend is Oracle, test that we can save a text longer
# than 4000 chars and read it properly
@@ -50,6 +47,14 @@ def test_long_string(self):
self.assertEquals(long_str, row[0].read())
c.execute('DROP TABLE ltext')
+ def test_client_encoding(self):
+ # If the backend is Oracle, test that the client encoding is set
+ # correctly. This was broken under Cygwin prior to r14781.
+ if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'] == 'django.db.backends.oracle':
+ c = connection.cursor() # Ensure the connection is initialized.
+ self.assertEqual(connection.connection.encoding, "UTF-8")
+ self.assertEqual(connection.connection.nencoding, "UTF-8")
+
class DateQuotingTest(TestCase):
def test_django_date_trunc(self):
Please sign in to comment.
Something went wrong with that request. Please try again.