diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2025-11-14 13:36:15 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-14 13:36:15 +0100 |
| commit | 35f86b641a4eb26fa2b7c3842b6d374834a4ea6b (patch) | |
| tree | 66560f57604219cf10a2d65a9fad7b3545f2ff75 /tests/postgres_tests | |
| parent | 0eec2a163a4b2ea4e82c53ae1d7b71bf43ac911d (diff) | |
Refs #24928 -- Added introspection support for PostgreSQL HStoreField.
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_introspection.py | 13 |
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)", + ], + ) |
