summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/test_introspection.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/postgres_tests/test_introspection.py')
-rw-r--r--tests/postgres_tests/test_introspection.py13
1 files changed, 13 insertions, 0 deletions
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)",
+ ],
+ )