Skip to content

Commit

Permalink
[1.2.X] Added a regression test for r14781.
Browse files Browse the repository at this point in the history
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
nightflyerkilo committed Dec 3, 2010
1 parent 57e5ccb commit 99b5526
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/regressiontests/backends/tests.py
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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):
Expand Down

0 comments on commit 99b5526

Please sign in to comment.