diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/backends/tests.py | 6 | ||||
| -rw-r--r-- | tests/requirements/postgres.txt | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py index edc4783f0e..a624bf57b2 100644 --- a/tests/backends/tests.py +++ b/tests/backends/tests.py @@ -290,14 +290,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): diff --git a/tests/requirements/postgres.txt b/tests/requirements/postgres.txt index 658130bb2c..4ff5f170a9 100644 --- a/tests/requirements/postgres.txt +++ b/tests/requirements/postgres.txt @@ -1 +1 @@ -psycopg2 +psycopg2>=2.5 |
