MCPcopy
hub / github.com/django/django / test_in_bulk_non_unique_field

Method test_in_bulk_non_unique_field

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

Source from the content-addressed store, hash-verified

245 )
246
247 def test_in_bulk_non_unique_field(self):
248 msg = "in_bulk()'s field_name must be a unique field but 'author' isn't."
249 with self.assertRaisesMessage(ValueError, msg):
250 Article.objects.in_bulk([self.au1], field_name="author")
251
252 def test_in_bulk_preserve_ordering(self):
253 self.assertEqual(

Callers

nothing calls this directly

Calls 2

assertRaisesMessageMethod · 0.80
in_bulkMethod · 0.80

Tested by

no test coverage detected