summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2017-08-23 10:01:49 +0200
committerGitHub <noreply@github.com>2017-08-23 10:01:49 +0200
commit0d21bdd3805f5d3a37a02062a170cabe377aa8fe (patch)
tree4028288ca47eab302092925fb663b89ee9dc8cd8 /tests
parente6dd785bb7dd7e02ee338786f73f7fdcdc6f60ec (diff)
[1.11.x] Fixed #28498 -- Added support for cx_Oracle 6.
- Fixed implicit Decimal to float conversion when input_size is not specified for Decimal parameters. - Used encoding, nencoding parameters of cx_Oracle.connect() to support unicode in DSN. Thanks Tim Graham for the review.
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/tests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 83d6b05b5e..16a20de40d 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -117,6 +117,14 @@ class OracleTests(unittest.TestCase):
connection.ensure_connection()
self.assertEqual(connection.connection.encoding, "UTF-8")
self.assertEqual(connection.connection.nencoding, "UTF-8")
+ # Client encoding may be changed in OPTIONS.
+ new_connection = connection.copy()
+ new_connection.settings_dict['OPTIONS']['encoding'] = 'ISO-8859-2'
+ new_connection.settings_dict['OPTIONS']['nencoding'] = 'ASCII'
+ new_connection.ensure_connection()
+ self.assertEqual(new_connection.connection.encoding, 'ISO-8859-2')
+ self.assertEqual(new_connection.connection.nencoding, 'ASCII')
+ new_connection.close()
def test_order_of_nls_parameters(self):
# an 'almost right' datetime should work with configured