Created
May 17, 2015 18:02
-
-
Save zerok/8880cf0db30c4419ac02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/tests/test_sftp.py b/tests/test_sftp.py | |
index 6a514ac..9b7146d 100644 | |
--- a/tests/test_sftp.py | |
+++ b/tests/test_sftp.py | |
@@ -75,6 +75,13 @@ def test_sftpserver_write_offset_unsupported(content, sftpclient): | |
f.write("test") | |
+def test_sftpserver_put_file(content, sftpclient, tmpdir): | |
+ tmpfile = tmpdir.join('test.txt') | |
+ tmpfile.write('Hello world') | |
+ sftpclient.put(str(tmpfile), '/a/test.txt') | |
+ assert set(sftpclient.listdir('/a')) == set(['test.txt', 'b', 'c', 'f']) | |
+ | |
+ | |
def test_sftpserver_put_file_dict(content, sftpclient): | |
with sftpclient.open("/e", 'w') as f: | |
f.write("testfile4") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment