MCPcopy
hub / github.com/django/django / test_rename_missing_field

Method test_rename_missing_field

tests/migrations/test_operations.py:3652–3660  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3650 self.assertColumnExists("test_rfmx_pony", "field")
3651
3652 def test_rename_missing_field(self):
3653 state = ProjectState()
3654 state.add_model(ModelState("app", "model", []))
3655 with self.assertRaisesMessage(
3656 FieldDoesNotExist, "app.model has no field named 'field'"
3657 ):
3658 migrations.RenameField("model", "field", "new_field").state_forwards(
3659 "app", state
3660 )
3661
3662 def test_rename_referenced_field_state_forward(self):
3663 state = ProjectState()

Callers

nothing calls this directly

Calls 5

add_modelMethod · 0.95
ProjectStateClass · 0.90
ModelStateClass · 0.90
assertRaisesMessageMethod · 0.80
state_forwardsMethod · 0.45

Tested by

no test coverage detected