MCPcopy
hub / github.com/django/django / test_in_bulk_sliced_queryset

Method test_in_bulk_sliced_queryset

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

Source from the content-addressed store, hash-verified

314 Model.objects.in_bulk(field_name=field_name)
315
316 def test_in_bulk_sliced_queryset(self):
317 msg = "Cannot use 'limit' or 'offset' with in_bulk()."
318 with self.assertRaisesMessage(TypeError, msg):
319 Article.objects.all()[0:5].in_bulk([self.a1.id, self.a2.id])
320
321 def test_in_bulk_values_empty(self):
322 arts = Article.objects.values().in_bulk([])

Callers

nothing calls this directly

Calls 3

assertRaisesMessageMethod · 0.80
in_bulkMethod · 0.80
allMethod · 0.45

Tested by

no test coverage detected