diff options
author | Simon Charette <charette.s@gmail.com> | 2017-04-01 14:00:47 -0400 |
---|---|---|
committer | Simon Charette <charette.s@gmail.com> | 2017-06-20 22:59:22 -0400 |
commit | ea91ad4c131816fd0ea8d5f1bfb21b7abd82b47e (patch) | |
tree | 2c3ced0c291d19b630c528878a3b740c9b68af23 /tests/indexes | |
parent | ad524980ac9644d5d40c2c79af3c183f4351841e (diff) | |
download | django-ea91ad4c131816fd0ea8d5f1bfb21b7abd82b47e.tar.gz |
Refs #25530 -- Changed _create_index_name to take a table as first parameter.
Diffstat (limited to 'tests/indexes')
-rw-r--r-- | tests/indexes/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/indexes/tests.py b/tests/indexes/tests.py index b266d71e9a..c2d76feeb9 100644 --- a/tests/indexes/tests.py +++ b/tests/indexes/tests.py @@ -19,7 +19,7 @@ class SchemaIndexesTests(TestCase): """ with connection.schema_editor() as editor: index_name = editor._create_index_name( - model=Article, + table_name=Article._meta.db_table, column_names=("c1",), suffix="123", ) @@ -35,7 +35,7 @@ class SchemaIndexesTests(TestCase): long_name = 'l%sng' % ('o' * 100) with connection.schema_editor() as editor: index_name = editor._create_index_name( - model=Article, + table_name=Article._meta.db_table, column_names=('c1', 'c2', long_name), suffix='ix', ) @@ -56,7 +56,7 @@ class SchemaIndexesTests(TestCase): # Ensure the index name is properly quoted self.assertIn( connection.ops.quote_name( - editor._create_index_name(Article, ['headline', 'pub_date'], suffix='_idx') + editor._create_index_name(Article._meta.db_table, ['headline', 'pub_date'], suffix='_idx') ), index_sql[0] ) |