MCPcopy
hub / github.com/django/django / test_in_bulk_preserve_ordering

Method test_in_bulk_preserve_ordering

tests/lookup/tests.py:252–256  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

250 Article.objects.in_bulk([self.au1], field_name="author")
251
252 def test_in_bulk_preserve_ordering(self):
253 self.assertEqual(
254 list(Article.objects.in_bulk([self.a2.id, self.a1.id])),
255 [self.a2.id, self.a1.id],
256 )
257
258 def test_in_bulk_preserve_ordering_with_batch_size(self):
259 qs = Article.objects.all()

Callers

nothing calls this directly

Calls 1

in_bulkMethod · 0.80

Tested by

no test coverage detected