From 643b318b88a3a4238fe4bd344de6026928a7c9d9 Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Mon, 16 Jul 2018 10:07:22 -0400 Subject: [PATCH] tests: verify that extend_env gets removed from **kw Signed-off-by: Alfredo Deza --- remoto/tests/test_process.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/remoto/tests/test_process.py b/remoto/tests/test_process.py index 4588f5c..5509705 100644 --- a/remoto/tests/test_process.py +++ b/remoto/tests/test_process.py @@ -31,3 +31,10 @@ class TestExtendPath(object): new_path = result['env']['PATH'] assert result['env']['PATH'].endswith(self.path) assert result['env']['CEPH_VOLUME_DEBUG'] == '1' + + def test_extend_env_gets_removed(self): + fake_conn = Mock() + fake_conn.gateway.remote_exec.return_value = fake_conn + fake_conn.receive.return_value = {'PATH': '/home/alfredo/bin'} + result = process.extend_env(fake_conn, {'extend_env': {'CEPH_VOLUME_DEBUG': '1'}}) + assert result.get('extend_env') is None -- 2.47.3