summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Kelly <ian.g.kelly@gmail.com>2010-04-28 17:15:11 +0000
committerIan Kelly <ian.g.kelly@gmail.com>2010-04-28 17:15:11 +0000
commit6f4563acede94a339cd64235cce95ba224be259d (patch)
tree05a9e3a1acfd4c05659f8f15f0a7d73a6c1d3778 /tests
parent5f1ecdc51ab9a55e8155fae9026783ab76c9c8c2 (diff)
[1.1.X] Fixed a bug preventing cursor variables from being passed as bind parameters in the oracle backend. Backport of r13042 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/backends/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/regressiontests/backends/tests.py b/tests/regressiontests/backends/tests.py
index da3f4ab17c..28dfd7f208 100644
--- a/tests/regressiontests/backends/tests.py
+++ b/tests/regressiontests/backends/tests.py
@@ -22,6 +22,16 @@ class Callproc(unittest.TestCase):
else:
return True
+ def test_cursor_var(self):
+ # If the backend is Oracle, test that we can pass cursor variables
+ # as query parameters.
+ if settings.DATABASE_ENGINE == 'oracle':
+ cursor = connection.cursor()
+ var = cursor.var(backend.Database.STRING)
+ cursor.execute("BEGIN %s := 'X'; END; ", [var])
+ self.assertEqual(var.getvalue(), 'X')
+
+
class LongString(unittest.TestCase):
def test_long_string(self):