summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/indexes/tests.py6
-rw-r--r--tests/schema/tests.py2
2 files changed, 4 insertions, 4 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]
)
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index ecc6aeb1c6..d2707ecea7 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -1640,7 +1640,7 @@ class SchemaTests(TransactionTestCase):
author_index_name = index.name
with connection.schema_editor() as editor:
db_index_name = editor._create_index_name(
- model=AuthorWithIndexedName,
+ table_name=AuthorWithIndexedName._meta.db_table,
column_names=('name',),
)
if connection.features.uppercases_column_names: