From 8ed024b9b9ca4491fcb17cb15b3b5f18a8f60ff8 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 13 Nov 2020 00:17:13 -0500 Subject: [PATCH] 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. --- tests/schema/tests.py | 7 +------ 1 file changed, 1 insertion(+), 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):