diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index ba20c7516a..38192d4fa6 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -2100,6 +2100,8 @@ that fail constraints such as duplicate unique values. Enabling this parameter disables setting the primary key on each model instance (if the database normally supports it). +Returns ``objs`` as cast to a list, in the same order as provided. + ``bulk_update()`` ~~~~~~~~~~~~~~~~~ diff --git a/tests/bulk_create/tests.py b/tests/bulk_create/tests.py index 3ccbfc19b3..2fd9801d35 100644 --- a/tests/bulk_create/tests.py +++ b/tests/bulk_create/tests.py @@ -26,7 +26,7 @@ class BulkCreateTests(TestCase): def test_simple(self): created = Country.objects.bulk_create(self.data) - self.assertEqual(len(created), 4) + self.assertEqual(created, self.data) self.assertQuerysetEqual(Country.objects.order_by("-name"), [ "United States of America", "The Netherlands", "Germany", "Czech Republic" ], attrgetter("name"))