MCPcopy
hub / github.com/django/django / test_nonexistent_field

Method test_nonexistent_field

tests/queries/test_bulk_update.py:142–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

140 Note.objects.bulk_update([], fields=["note"], batch_size=0)
141
142 def test_nonexistent_field(self):
143 with self.assertRaisesMessage(
144 FieldDoesNotExist, "Note has no field named 'nonexistent'"
145 ):
146 Note.objects.bulk_update([], ["nonexistent"])
147
148 pk_fields_error = "bulk_update() cannot be used with primary key fields."
149

Callers

nothing calls this directly

Calls 2

assertRaisesMessageMethod · 0.80
bulk_updateMethod · 0.45

Tested by

no test coverage detected