summaryrefslogtreecommitdiff
path: root/tests/dbshell/test_postgresql.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dbshell/test_postgresql.py')
-rw-r--r--tests/dbshell/test_postgresql.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/dbshell/test_postgresql.py b/tests/dbshell/test_postgresql.py
index 4d8804e43e..ccf49d7e50 100644
--- a/tests/dbshell/test_postgresql.py
+++ b/tests/dbshell/test_postgresql.py
@@ -1,3 +1,4 @@
+import os
import signal
import subprocess
import sys
@@ -121,6 +122,8 @@ class PostgreSqlDbshellCommandTestCase(SimpleTestCase):
# The password doesn't leak in an exception that results from a client
# crash.
args, env = self.settings_to_cmd_args_env({'PASSWORD': 'somepassword'}, [])
+ if env:
+ env = {**os.environ, **env}
fake_client = Path(__file__).with_name('fake_client.py')
args[0:1] = [sys.executable, str(fake_client)]
with self.assertRaises(subprocess.CalledProcessError) as ctx: