MCPcopy
hub / github.com/django/django / test_custom_db_columns

Method test_custom_db_columns

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

Source from the content-addressed store, hash-verified

194 Valid.objects.bulk_update([obj], fields=["parent"])
195
196 def test_custom_db_columns(self):
197 model = CustomDbColumn.objects.create(custom_column=1)
198 model.custom_column = 2
199 CustomDbColumn.objects.bulk_update([model], fields=["custom_column"])
200 model.refresh_from_db()
201 self.assertEqual(model.custom_column, 2)
202
203 def test_custom_pk(self):
204 custom_pks = [

Callers

nothing calls this directly

Calls 3

createMethod · 0.45
bulk_updateMethod · 0.45
refresh_from_dbMethod · 0.45

Tested by

no test coverage detected