From 35f86b641a4eb26fa2b7c3842b6d374834a4ea6b Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 14 Nov 2025 13:36:15 +0100 Subject: Refs #24928 -- Added introspection support for PostgreSQL HStoreField. --- tests/postgres_tests/test_introspection.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/test_introspection.py b/tests/postgres_tests/test_introspection.py index 73c426d1ba..1ae940fdb9 100644 --- a/tests/postgres_tests/test_introspection.py +++ b/tests/postgres_tests/test_introspection.py @@ -33,3 +33,16 @@ class InspectDBTests(PostgreSQLTestCase): "null=True)", ], ) + + def test_hstore_field(self): + from django.db.backends.postgresql.base import psycopg_version + + if psycopg_version() < (3, 2): + self.skipTest("psycopg 3.2+ is required.") + self.assertFieldsInModel( + "postgres_tests_hstoremodel", + [ + "field = django.contrib.postgres.fields.HStoreField(blank=True, " + "null=True)", + ], + ) -- cgit v1.3