diff --git a/tests/test_connection.py b/tests/test_connection.py index 76e83cf3..68de87ad 100755 --- a/tests/test_connection.py +++ b/tests/test_connection.py @@ -75,6 +75,9 @@ class ConnectionTests(unittest.TestCase): cur = conn.cursor() try: cur.execute("select pg_terminate_backend(pg_backend_pid())") + except psycopg2.DatabaseError, e: + # curiously in green mode we get a DatabaseError without pgcode + pass except psycopg2.OperationalError, e: if e.pgcode != psycopg2.errorcodes.ADMIN_SHUTDOWN: raise