1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[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.
This commit is contained in:
Mariusz Felisiak
2017-08-23 10:01:49 +02:00
committed by GitHub
parent e6dd785bb7
commit 0d21bdd380
3 changed files with 17 additions and 4 deletions

View File

@@ -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