mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #24335 -- Bumped required psycopg2 version to 2.4.5 (2.5 for contrib.postgres).
This commit is contained in:
parent
664c038f2c
commit
3adc5f1ee6
6 changed files with 33 additions and 33 deletions
|
@ -289,14 +289,14 @@ class PostgreSQLTests(TestCase):
|
|||
self.assertIn('::text', do.lookup_cast(lookup))
|
||||
|
||||
def test_correct_extraction_psycopg2_version(self):
|
||||
from django.db.backends.postgresql_psycopg2.base import DatabaseWrapper
|
||||
from django.db.backends.postgresql_psycopg2.base import psycopg2_version
|
||||
version_path = 'django.db.backends.postgresql_psycopg2.base.Database.__version__'
|
||||
|
||||
with mock.patch(version_path, '2.6.9'):
|
||||
self.assertEqual(DatabaseWrapper.psycopg2_version.__get__(self), (2, 6, 9))
|
||||
self.assertEqual(psycopg2_version(), (2, 6, 9))
|
||||
|
||||
with mock.patch(version_path, '2.5.dev0'):
|
||||
self.assertEqual(DatabaseWrapper.psycopg2_version.__get__(self), (2, 5))
|
||||
self.assertEqual(psycopg2_version(), (2, 5))
|
||||
|
||||
|
||||
class DateQuotingTest(TestCase):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue