File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414)
1515from common .projects .permissions import VIEW_PROJECT
1616from django .contrib .contenttypes .models import ContentType
17+ from django .contrib .postgres .signals import (
18+ register_type_handlers ,
19+ )
1720from django .core .cache import caches
21+ from django .db import connections
1822from django .db .backends .base .creation import TEST_DATABASE_PREFIX
1923from django .test .utils import setup_databases
2024from flag_engine .segments .constants import EQUAL
@@ -135,6 +139,11 @@ def pytest_configure(config: pytest.Config) -> None:
135139 interactive = False ,
136140 parallel = config .option .numprocesses ,
137141 )
142+ # Ensure psycopg type handlers are registered.
143+ # This is necessary for tests that involve `HStoreField`.
144+ for connection in connections .all ():
145+ if connection .vendor == "postgresql" :
146+ register_type_handlers (connection )
138147
139148
140149@pytest .fixture
You can’t perform that action at this time.
0 commit comments