mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #27236 -- Removed usage of Meta.index_together from indexes/introspection test models.
This commit is contained in:
committed by
Mariusz Felisiak
parent
77330a089c
commit
f8f16b3cd8
@@ -68,17 +68,13 @@ class SchemaIndexesTests(TestCase):
|
||||
)
|
||||
self.assertEqual(index_name, expected[connection.vendor])
|
||||
|
||||
def test_index_together(self):
|
||||
def test_quoted_index_name(self):
|
||||
editor = connection.schema_editor()
|
||||
index_sql = [str(statement) for statement in editor._model_indexes_sql(Article)]
|
||||
self.assertEqual(len(index_sql), 1)
|
||||
# Ensure the index name is properly quoted
|
||||
# Ensure the index name is properly quoted.
|
||||
self.assertIn(
|
||||
connection.ops.quote_name(
|
||||
editor._create_index_name(
|
||||
Article._meta.db_table, ["headline", "pub_date"], suffix="_idx"
|
||||
)
|
||||
),
|
||||
connection.ops.quote_name(Article._meta.indexes[0].name),
|
||||
index_sql[0],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user