summaryrefslogtreecommitdiff
path: root/tests/backends/postgresql/tests.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2025-11-14 13:36:15 +0100
committerGitHub <noreply@github.com>2025-11-14 13:36:15 +0100
commit35f86b641a4eb26fa2b7c3842b6d374834a4ea6b (patch)
tree66560f57604219cf10a2d65a9fad7b3545f2ff75 /tests/backends/postgresql/tests.py
parent0eec2a163a4b2ea4e82c53ae1d7b71bf43ac911d (diff)
Refs #24928 -- Added introspection support for PostgreSQL HStoreField.
Diffstat (limited to 'tests/backends/postgresql/tests.py')
-rw-r--r--tests/backends/postgresql/tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/backends/postgresql/tests.py b/tests/backends/postgresql/tests.py
index f7e7d1e68c..e03c37cb57 100644
--- a/tests/backends/postgresql/tests.py
+++ b/tests/backends/postgresql/tests.py
@@ -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)"
):