(self)
| 65 | ) |
| 66 | |
| 67 | def test_index_name(self): |
| 68 | if not self.has_spatial_indexes(City._meta.db_table): |
| 69 | self.skipTest("Spatial indexes in Meta.indexes are not supported.") |
| 70 | index_name = "custom_point_index_name" |
| 71 | index = Index(fields=["point"], name=index_name) |
| 72 | with connection.schema_editor() as editor: |
| 73 | editor.add_index(City, index) |
| 74 | indexes = self.get_indexes(City._meta.db_table) |
| 75 | self.assertIn(index_name, indexes) |
| 76 | self.assertEqual(indexes[index_name], ["point"]) |
| 77 | editor.remove_index(City, index) |
nothing calls this directly
no test coverage detected