summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-04-10 07:51:04 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-04-10 07:51:04 +0200
commite68c084ed17d185f19658e1d7fe8c7047d59aea6 (patch)
treedc4a8e76953e2943b2efe56ae3a9cb460dc8b845 /tests
parentd5cef2a19c5a70766693264d08605f56d26e573d (diff)
Fixed a broken test introduced in 6fa7d7c5. Refs #21553.
Thanks Shai.
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 9f8d14279e..0da5cb85e2 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -488,7 +488,7 @@ class BackendTestCase(TestCase):
def create_squares_with_executemany(self, args):
self.create_squares(args, 'format', True)
- def create_squares(self, args, paramstyle, multiple):
+ def create_squares(self, args, paramstyle, multiple):
cursor = connection.cursor()
opts = models.Square._meta
tbl = connection.introspection.table_name_converter(opts.db_table)
@@ -560,7 +560,7 @@ class BackendTestCase(TestCase):
# same test for DebugCursorWrapper
self.create_squares(args, 'pyformat', multiple=True)
self.assertEqual(models.Square.objects.count(), 9)
-
+
def test_unicode_fetches(self):
#6254: fetchone, fetchmany, fetchall return strings as unicode objects
qn = connection.ops.quote_name
@@ -627,8 +627,7 @@ class IsUsableTests(TransactionTestCase):
Regression for #21553.
"""
# Open a connection to the database.
- with connection.cursor():
- pass
+ connection.cursor().close()
# Emulate a connection close by the database.
connection._close()
# Even then is_usable() should not raise an exception.