diff --git a/tests/test_cli.py b/tests/test_cli.py index e06a1c7..5355f14 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -101,8 +101,6 @@ def test_virtuser(self): assert pallium_exec_output(profile, ['whoami']) == 'johndoe' def test_mv(self): - with tempfile.NamedTemporaryFile(): - pass profile = { 'sandbox': { 'virtuser': { @@ -125,6 +123,10 @@ def test_mv(self): exec_result = session.exec(['cat', '/home/johndoe/hello.txt']) assert exec_result == 'hello world' + subprocess.call(['pallium', 'mv', '/home/johndoe/hello.txt', tmp.name, '--from', session.profile_path]) + with open(tmp.name, 'r') as f: + assert f.read() == 'hello world' + def test_port_forwarding(self): profile = { 'network': {