Fixed #24335 -- Bumped required psycopg2 version to 2.4.5 (2.5 for contrib.postgres).

This commit is contained in:
Tim Graham 2015-02-16 12:11:39 -05:00
parent 664c038f2c
commit 3adc5f1ee6
6 changed files with 33 additions and 33 deletions

View file

@ -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):