Refs #24928 -- Added introspection support for PostgreSQL HStoreField.

This commit is contained in:
Mariusz Felisiak 2025-11-14 13:36:15 +01:00 committed by GitHub
parent 0eec2a163a
commit 35f86b641a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 2 deletions

View file

@ -517,8 +517,11 @@ class Tests(TestCase):
def test_correct_extraction_psycopg_version(self):
from django.db.backends.postgresql.base import Database, psycopg_version
psycopg_version.cache_clear()
with mock.patch.object(Database, "__version__", "4.2.1 (dt dec pq3 ext lo64)"):
self.addCleanup(psycopg_version.cache_clear)
self.assertEqual(psycopg_version(), (4, 2, 1))
psycopg_version.cache_clear()
with mock.patch.object(
Database, "__version__", "4.2b0.dev1 (dt dec pq3 ext lo64)"
):