mirror of
https://github.com/django/django.git
synced 2025-10-27 15:46:10 +00:00
Fixed #36623 -- Dropped support for PostgreSQL 14 and PostGIS 3.1.
This commit is contained in:
committed by
Jacob Walls
parent
2514857e3f
commit
5bd775703c
@@ -549,12 +549,12 @@ class Tests(TestCase):
|
||||
|
||||
def test_get_database_version(self):
|
||||
new_connection = no_pool_connection()
|
||||
new_connection.pg_version = 140009
|
||||
self.assertEqual(new_connection.get_database_version(), (14, 9))
|
||||
new_connection.pg_version = 150009
|
||||
self.assertEqual(new_connection.get_database_version(), (15, 9))
|
||||
|
||||
@mock.patch.object(connection, "get_database_version", return_value=(13,))
|
||||
@mock.patch.object(connection, "get_database_version", return_value=(14,))
|
||||
def test_check_database_version_supported(self, mocked_get_database_version):
|
||||
msg = "PostgreSQL 14 or later is required (found 13)."
|
||||
msg = "PostgreSQL 15 or later is required (found 14)."
|
||||
with self.assertRaisesMessage(NotSupportedError, msg):
|
||||
connection.check_database_version_supported()
|
||||
self.assertTrue(mocked_get_database_version.called)
|
||||
|
||||
Reference in New Issue
Block a user