summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-05-21 11:11:05 +0200
committerClaude Paroz <claude@2xlibre.net>2013-05-23 15:19:12 +0200
commit499a745ae1b53614035b9993b148f32d4ce3f138 (patch)
tree2bd8636564f1674de89751ac553ea04ec1638290 /tests
parenta46a399534c26abd3f4984149b820f34869d6b74 (diff)
Fixed #20474 -- Proxied and deprecated django.db.backend
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/tests.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 79e3dd444e..08cae0f7c3 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -8,7 +8,7 @@ import threading
from django.conf import settings
from django.core.management.color import no_style
-from django.db import (backend, connection, connections, DEFAULT_DB_ALIAS,
+from django.db import (connection, connections, DEFAULT_DB_ALIAS,
DatabaseError, IntegrityError, transaction)
from django.db.backends.signals import connection_created
from django.db.backends.postgresql_psycopg2 import version as pg_version
@@ -50,7 +50,8 @@ class OracleChecks(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.
- convert_unicode = backend.convert_unicode
+ from django.db.backends.oracle.base import convert_unicode
+
cursor = connection.cursor()
cursor.callproc(convert_unicode('DBMS_SESSION.SET_IDENTIFIER'),
[convert_unicode('_django_testing!')])
@@ -60,8 +61,10 @@ class OracleChecks(unittest.TestCase):
def test_cursor_var(self):
# If the backend is Oracle, test that we can pass cursor variables
# as query parameters.
+ from django.db.backends.oracle.base import Database
+
cursor = connection.cursor()
- var = cursor.var(backend.Database.STRING)
+ var = cursor.var(Database.STRING)
cursor.execute("BEGIN %s := 'X'; END; ", [var])
self.assertEqual(var.getvalue(), 'X')