mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Ensure bulk_create returns what it is supposed to.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -17,7 +17,8 @@ class BulkCreateTests(TestCase):
|
||||
]
|
||||
|
||||
def test_simple(self):
|
||||
Country.objects.bulk_create(self.data)
|
||||
created = Country.objects.bulk_create(self.data)
|
||||
self.assertEqual(len(created), 4)
|
||||
self.assertQuerysetEqual(Country.objects.order_by("-name"), [
|
||||
"United States of America", "The Netherlands", "Germany", "Czech Republic"
|
||||
], attrgetter("name"))
|
||||
|
||||
Reference in New Issue
Block a user