summaryrefslogtreecommitdiff
path: root/tests/backends
diff options
context:
space:
mode:
authorSergey Fedoseev <fedoseev.sergey@gmail.com>2019-02-09 19:18:22 +0500
committerTim Graham <timograham@gmail.com>2019-02-09 09:18:22 -0500
commitb1a2ad69251053a5f1ce71ffa95b188c4a765388 (patch)
tree70e08ed66c1467fbb4b1770e59a95eb4acd21870 /tests/backends
parentb8c48d06fab3f1c9d52c28422a4a1b8350f5537f (diff)
downloaddjango-b1a2ad69251053a5f1ce71ffa95b188c4a765388.tar.gz
Removed uneeded iter() calls with generator expression as argument.
Diffstat (limited to 'tests/backends')
-rw-r--r--tests/backends/tests.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index d1b89950c0..7e4e665758 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -249,11 +249,11 @@ class BackendTestCase(TransactionTestCase):
def test_cursor_executemany_with_iterator(self):
# Test executemany accepts iterators #10320
- args = iter((i, i ** 2) for i in range(-3, 2))
+ args = ((i, i ** 2) for i in range(-3, 2))
self.create_squares_with_executemany(args)
self.assertEqual(Square.objects.count(), 5)
- args = iter((i, i ** 2) for i in range(3, 7))
+ args = ((i, i ** 2) for i in range(3, 7))
with override_settings(DEBUG=True):
# same test for DebugCursorWrapper
self.create_squares_with_executemany(args)
@@ -278,11 +278,11 @@ class BackendTestCase(TransactionTestCase):
@skipUnlessDBFeature('supports_paramstyle_pyformat')
def test_cursor_executemany_with_pyformat_iterator(self):
- args = iter({'root': i, 'square': i ** 2} for i in range(-3, 2))
+ args = ({'root': i, 'square': i ** 2} for i in range(-3, 2))
self.create_squares(args, 'pyformat', multiple=True)
self.assertEqual(Square.objects.count(), 5)
- args = iter({'root': i, 'square': i ** 2} for i in range(3, 7))
+ args = ({'root': i, 'square': i ** 2} for i in range(3, 7))
with override_settings(DEBUG=True):
# same test for DebugCursorWrapper
self.create_squares(args, 'pyformat', multiple=True)