From b41a45f8e5fa87673d984663d39531292fd8a100 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Fri, 16 Jan 2009 22:23:58 +0000 Subject: Fixed #5543: callproc() and friends now work with Oracle and our FormatStylePlaceholderCursor. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9767 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/backends/tests.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/regressiontests/backends/tests.py (limited to 'tests') diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py new file mode 100644 index 0000000000..5dec9feee6 --- /dev/null +++ b/tests/regressiontests/backends/tests.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + +# Unit tests for specific database backends. + +import unittest + +from django.db import connection +from django.conf import settings + + +class Callproc(unittest.TestCase): + + def test_dbms_session(self): + # If the backend is Oracle, test that we can call a standard + # stored procedure through our cursor wrapper. + if settings.DATABASE_ENGINE == 'oracle': + cursor = connection.cursor() + cursor.callproc('DBMS_SESSION.SET_IDENTIFIER', + ['_django_testing!',]) + return True + else: + return True + + +if __name__ == '__main__': + unittest.main() -- cgit v1.3