diff --git a/tests/db/remote/host/test_local.py b/tests/db/remote/host/test_local.py index 0157f565..254caf96 100644 --- a/tests/db/remote/host/test_local.py +++ b/tests/db/remote/host/test_local.py @@ -10,9 +10,9 @@ def test_sanitize(mock_run): cmd = "echo 'test'" - echo_cmd = f'echo -n "{SANITIZE_KEY}" | tee >(cat >&2)' + echo_cmd = f'echo "{SANITIZE_KEY}" | tee /dev/stderr' expected_cmd = f"{echo_cmd};{cmd};{echo_cmd}" - mock_stdout = f"SOME NOISE --{SANITIZE_KEY}test{SANITIZE_KEY}SOME appended TEXT" + mock_stdout = f"SOME NOISE --{SANITIZE_KEY}\ntest{SANITIZE_KEY}\nSOME appended TEXT" # Configure the mock mock_run.return_value.returncode = 0 diff --git a/tests/db/remote/host/test_remote.py b/tests/db/remote/host/test_remote.py index d31741dd..f8709cac 100644 --- a/tests/db/remote/host/test_remote.py +++ b/tests/db/remote/host/test_remote.py @@ -17,9 +17,9 @@ def test_sanitize(mock_cd, mock_run): cmd = "echo 'test'" - echo_cmd = f'echo -n "{SANITIZE_KEY}" | tee >(cat >&2)' + echo_cmd = f'echo "{SANITIZE_KEY}" | tee /dev/stderr' expected_cmd = f"{echo_cmd};{cmd};{echo_cmd}" - mock_stdout = f"SOME NOISE --{SANITIZE_KEY}test{SANITIZE_KEY}SOME appended TEXT" + mock_stdout = f"SOME NOISE --{SANITIZE_KEY}\ntest{SANITIZE_KEY}\nSOME appended TEXT" # Configure the mock mock_cd.return_value.__enter__ = (