(self)
| 175 | self.assertEqual(len(index_sql), 1) |
| 176 | |
| 177 | def test_ops_class(self): |
| 178 | index = Index( |
| 179 | name="test_ops_class", |
| 180 | fields=["headline"], |
| 181 | opclasses=["varchar_pattern_ops"], |
| 182 | ) |
| 183 | with connection.schema_editor() as editor: |
| 184 | editor.add_index(IndexedArticle2, index) |
| 185 | with editor.connection.cursor() as cursor: |
| 186 | cursor.execute(self.get_opclass_query % "test_ops_class") |
| 187 | self.assertEqual( |
| 188 | cursor.fetchall(), [("varchar_pattern_ops", "test_ops_class")] |
| 189 | ) |
| 190 | |
| 191 | def test_ops_class_multiple_columns(self): |
| 192 | index = Index( |
nothing calls this directly
no test coverage detected