MCPcopy
hub / github.com/django/django / test_remove_indexed_field

Method test_remove_indexed_field

tests/schema/tests.py:1106–1115  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1104 )
1105
1106 def test_remove_indexed_field(self):
1107 with connection.schema_editor() as editor:
1108 editor.create_model(AuthorCharFieldWithIndex)
1109 with connection.schema_editor() as editor:
1110 editor.remove_field(
1111 AuthorCharFieldWithIndex,
1112 AuthorCharFieldWithIndex._meta.get_field("char_field"),
1113 )
1114 columns = self.column_classes(AuthorCharFieldWithIndex)
1115 self.assertNotIn("char_field", columns)
1116
1117 def test_alter(self):
1118 """

Callers

nothing calls this directly

Calls 5

column_classesMethod · 0.95
schema_editorMethod · 0.80
create_modelMethod · 0.45
remove_fieldMethod · 0.45
get_fieldMethod · 0.45

Tested by

no test coverage detected