From 6188a4cfe367fa083070bb0edc5cca87c5661bd2 Mon Sep 17 00:00:00 2001 From: Ron Frederick Date: Fri, 16 Dec 2016 22:22:47 -0800 Subject: [PATCH] Update unit tests to not inherit environment This commit updates the unit tests to always start with a known set of environment variables rather than inheriting the environment from the shell running the tests. This avoids breakage when there's something in the environment that AsyncSSH looks for that the test case didn't intend to set. --- tests/server.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/server.py b/tests/server.py index f657d178..c2557c24 100644 --- a/tests/server.py +++ b/tests/server.py @@ -132,8 +132,7 @@ def asyncSetUpClass(cls): cls._server_port)) run('cat skey.pub >> .ssh/known_hosts') - os.environ['LOGNAME'] = 'guest' - os.environ['HOME'] = '.' + os.environ = {'LOGNAME': 'guest', 'HOME': '.'} try: output = run('ssh-agent -a agent 2>/dev/null')