  from django.db import NotSupportedError, connection
  from django.db.models import CharField, F, Index, Q
  from django.db.models.functions import Cast, Collate, Length, Lower
  from django.test import skipUnlessDBFeature
  from django.test.utils import modify_settings, register_lookup
  
  from . import PostgreSQLSimpleTestCase, PostgreSQLTestCase
  from .fields import SearchVector, SearchVectorField
  from .models import CharFieldModel, IntegerArrayModel, Scene, TextFieldModel
  
 
</s> remove from django.test import modify_settings
 </s> add  </s> remove from django.test import modify_settings
 </s> add  </s> remove from django.test import modify_settings

 </s> add  </s> remove @modify_settings(INSTALLED_APPS={"append": "django.contrib.postgres"})
 </s> add  </s> remove from django.test.utils import modify_settings
 </s> add 
from django.test.utils import register_lookup
  from django.db import NotSupportedError, connection
  from django.db.models import CharField, F, Index, Q
  from django.db.models.functions import Cast, Collate, Length, Lower
  from django.test import skipUnlessDBFeature
from django.test.utils import register_lookup
  
  from . import PostgreSQLSimpleTestCase, PostgreSQLTestCase
  from .fields import SearchVector, SearchVectorField
  from .models import CharFieldModel, IntegerArrayModel, Scene, TextFieldModel
  
keep keep keep keep replace keep keep keep keep keep
 Refs #33308 -- Ensured type handlers are registered for all PostgreSQL specific tests.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> 
tests/postgres_tests/test_indexes.py