diff test/test_postgresql.py @ 5751:5cb6e6b594b0

issue2551040: New release of psycopg2 drops support for psycopg1 First try at suport for psycopg2. Change .travis.yml to install newest psycopg2 without psycopg1 support.
author John Rouillard <rouilj@ieee.org>
date Sat, 01 Jun 2019 15:47:34 -0400
parents fcbeff272828
children 39189dd94f2c
line wrap: on
line diff
--- a/test/test_postgresql.py	Sat Jun 01 13:19:14 2019 -0400
+++ b/test/test_postgresql.py	Sat Jun 01 15:47:34 2019 -0400
@@ -34,7 +34,7 @@
         reason='Skipping PostgreSQL tests: backend not available'))
 else:
     try:
-        from roundup.backends.back_postgresql import psycopg, db_command
+        from roundup.backends.back_postgresql import psycopg2, db_command
         db_command(config, 'select 1')
         skip_postgresql = lambda func, *args, **kwargs: func
     except( DatabaseError ) as msg:
@@ -110,7 +110,7 @@
         try:
             self.db1.close()
             self.db2.close()
-        except psycopg.InterfaceError as exc:
+        except psycopg2.InterfaceError as exc:
             if 'connection already closed' in str(exc): pass
             else: raise
         ClassicInitBase.tearDown(self)

Roundup Issue Tracker: http://roundup-tracker.org/