summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2011-09-10 21:46:59 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2011-09-10 21:46:59 +0000
commitb45a4acf6f29025f28baf524809f34a14b7ccde7 (patch)
treea2882f1221e2251bcda18efa5a055e8ad73f0ed7 /tests
parentf2bc919ec00457fd53f093af53ab71c7f1bcfbcd (diff)
Ensure bulk_create returns the right value if the argument is an empty list.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16792 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/bulk_create/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/bulk_create/tests.py b/tests/regressiontests/bulk_create/tests.py
index d7d19a54aa..18383b52ed 100644
--- a/tests/regressiontests/bulk_create/tests.py
+++ b/tests/regressiontests/bulk_create/tests.py
@@ -23,6 +23,10 @@ class BulkCreateTests(TestCase):
"United States of America", "The Netherlands", "Germany", "Czech Republic"
], attrgetter("name"))
+ created = Country.objects.bulk_create([])
+ self.assertEqual(created, [])
+ self.assertEqual(Country.objects.count(), 4)
+
@skipUnlessDBFeature("has_bulk_insert")
def test_efficiency(self):
with self.assertNumQueries(1):