From bca72937d8f14d59c09205788625c5ac821c8e22 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 21 Jul 2020 03:00:08 +0100 Subject: [PATCH] Expose libpq PG* vars as testconfig content --- tests/testconfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/testconfig.py b/tests/testconfig.py index 82b48a39..511f1fb1 100644 --- a/tests/testconfig.py +++ b/tests/testconfig.py @@ -3,10 +3,10 @@ import os dbname = os.environ.get('PSYCOPG2_TESTDB', 'psycopg2_test') -dbhost = os.environ.get('PSYCOPG2_TESTDB_HOST', None) -dbport = os.environ.get('PSYCOPG2_TESTDB_PORT', None) -dbuser = os.environ.get('PSYCOPG2_TESTDB_USER', None) -dbpass = os.environ.get('PSYCOPG2_TESTDB_PASSWORD', None) +dbhost = os.environ.get('PSYCOPG2_TESTDB_HOST', os.environ.get('PGHOST')) +dbport = os.environ.get('PSYCOPG2_TESTDB_PORT', os.environ.get('PGPORT')) +dbuser = os.environ.get('PSYCOPG2_TESTDB_USER', os.environ.get('PGUSER')) +dbpass = os.environ.get('PSYCOPG2_TESTDB_PASSWORD', os.environ.get('PGPASSWORD')) # Check if we want to test psycopg's green path. green = os.environ.get('PSYCOPG2_TEST_GREEN', None)