1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #10566: Added support for cx_Oracle compiled with the WITH_UNICODE flag.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11477 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly
2009-08-24 15:45:48 +00:00
parent e263cc0dc5
commit dcf3be7a62
3 changed files with 23 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Unit and doctests for specific database backends.
import unittest
from django.db import connection
from django.db import backend, connection
from django.db.backends.signals import connection_created
from django.conf import settings
@@ -11,9 +11,10 @@ class Callproc(unittest.TestCase):
# If the backend is Oracle, test that we can call a standard
# stored procedure through our cursor wrapper.
if settings.DATABASE_ENGINE == 'oracle':
convert_unicode = backend.convert_unicode
cursor = connection.cursor()
cursor.callproc('DBMS_SESSION.SET_IDENTIFIER',
['_django_testing!',])
cursor.callproc(convert_unicode('DBMS_SESSION.SET_IDENTIFIER'),
[convert_unicode('_django_testing!'),])
return True
else:
return True