Skip to content

Commit

Permalink
tests: Symetric test for upload to override existing file
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakuje committed Nov 15, 2024
1 parent 9d64dcc commit cbbf5d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/unit/sftp_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ def test_get_existing(dst_exists_path, src_path, sftp_session, transmit_payload)
assert dst_exists_path.read_bytes() == transmit_payload


def test_put_existing(dst_exists_path, src_path, sftp_session, transmit_payload):
"""Check that SFTP file download works when target file exists."""
sftp_session.put(str(src_path), str(dst_exists_path))
assert dst_exists_path.read_bytes() == transmit_payload


@pytest.fixture
def large_payload():
"""Generate a large 1025 byte (1024 + 1B) test payload."""
Expand Down

0 comments on commit cbbf5d0

Please sign in to comment.