MCPcopy
hub / github.com/django/django / test_in_bulk_with_field

Method test_in_bulk_with_field

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

Source from the content-addressed store, hash-verified

221 self.assertEqual(Author.objects.in_bulk(authors), authors)
222
223 def test_in_bulk_with_field(self):
224 self.assertEqual(
225 Article.objects.in_bulk(
226 [self.a1.slug, self.a2.slug, self.a3.slug], field_name="slug"
227 ),
228 {
229 self.a1.slug: self.a1,
230 self.a2.slug: self.a2,
231 self.a3.slug: self.a3,
232 },
233 )
234
235 def test_in_bulk_meta_constraint(self):
236 season_2011 = Season.objects.create(year=2011)

Callers

nothing calls this directly

Calls 1

in_bulkMethod · 0.80

Tested by

no test coverage detected