Fixed #34851 -- Dropped support for PostgreSQL 12 and PostGIS 2.5.

This commit is contained in:
Mariusz Felisiak 2023-09-20 13:45:51 +02:00 committed by GitHub
parent 0b506bfe1a
commit 2c6ebb65c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 32 additions and 47 deletions

View file

@ -404,12 +404,12 @@ class Tests(TestCase):
def test_get_database_version(self):
new_connection = connection.copy()
new_connection.pg_version = 110009
self.assertEqual(new_connection.get_database_version(), (11, 9))
new_connection.pg_version = 130009
self.assertEqual(new_connection.get_database_version(), (13, 9))
@mock.patch.object(connection, "get_database_version", return_value=(11,))
@mock.patch.object(connection, "get_database_version", return_value=(12,))
def test_check_database_version_supported(self, mocked_get_database_version):
msg = "PostgreSQL 12 or later is required (found 11)."
msg = "PostgreSQL 13 or later is required (found 12)."
with self.assertRaisesMessage(NotSupportedError, msg):
connection.check_database_version_supported()
self.assertTrue(mocked_get_database_version.called)