summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Kelly <ian.g.kelly@gmail.com>2010-12-03 18:15:54 +0000
committerIan Kelly <ian.g.kelly@gmail.com>2010-12-03 18:15:54 +0000
commit5475da1c32efacab3d740bc599f19f2f33be6d2c (patch)
treeab0c71a3364ebdc844d0d9cc0b89dda8ae8d0f3b /tests
parentcbf9d6e0bbc323a81449250f139944e4c0b23b2c (diff)
Added a regression test for r14781. Also fixed a bug where connection.vendor was effectively always 'unknown', causing all vendor-specific tests to be skipped.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14783 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/backends/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index e457629880..efa3e0c7d3 100644
--- a/tests/regressiontests/backends/tests.py
+++ b/tests/regressiontests/backends/tests.py
@@ -47,6 +47,15 @@ class OracleChecks(unittest.TestCase):
self.assertEqual(long_str, row[0].read())
c.execute('DROP TABLE ltext')
+ @unittest.skipUnless(connection.vendor == 'oracle',
+ "No need to check Oracle connection semantics")
+ 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.
+ 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):