summaryrefslogtreecommitdiff
path: root/tests/schema
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2020-11-13 00:17:13 -0500
committerGitHub <noreply@github.com>2020-11-13 06:17:13 +0100
commit8ed024b9b9ca4491fcb17cb15b3b5f18a8f60ff8 (patch)
tree1d6308fc02e1a57f6b6211e1f6bf41b3e8f48043 /tests/schema
parent0cbccaebebf671332669a4e54a5fa0ede062fdd9 (diff)
Refs #32120 -- Fixed test_add_inline_fk_index_update_data for DatabaseFeatures.indexes_foreign_keys.
This test creates an index with editor.add_index() so it's present regardless of the database's behavior. Reverted the change from ede9fac75807fe5810df66280a60e7068cc97e4a.
Diffstat (limited to 'tests/schema')
-rw-r--r--tests/schema/tests.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py
index b986f27aa1..9b8e27e207 100644
--- a/tests/schema/tests.py
+++ b/tests/schema/tests.py
@@ -321,12 +321,7 @@ class SchemaTests(TransactionTestCase):
Node._meta.add_field(new_field)
editor.execute('UPDATE schema_node SET new_parent_fk_id = %s;', [parent.pk])
editor.add_index(Node, Index(fields=['new_parent_fk'], name='new_parent_inline_fk_idx'))
- assertIndex = (
- self.assertIn
- if connection.features.indexes_foreign_keys
- else self.assertNotIn
- )
- assertIndex('new_parent_fk_id', self.get_indexes(Node._meta.db_table))
+ self.assertIn('new_parent_fk_id', self.get_indexes(Node._meta.db_table))
@skipUnlessDBFeature('supports_foreign_keys')
def test_char_field_with_db_index_to_fk(self):