Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetretto committed Oct 14, 2024
1 parent 2639be3 commit c6b4163
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/db/remote/host/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/db/remote/host/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = (
Expand Down

0 comments on commit c6b4163

Please sign in to comment.