summaryrefslogtreecommitdiffhomepage
path: root/tests/test_sftp_big.py
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2008-03-22 19:00:54 -0700
committerRobey Pointer <robey@lag.net>2008-03-22 19:00:54 -0700
commit419b11b74118e27b8f71bdc695d0112cd0e3f378 (patch)
tree7988d0e38e3c3a268b10a6f6f96693c20ccc4639 /tests/test_sftp_big.py
parent613d2a2f24ea534b9c6b9d1778e6146d53221707 (diff)
[project @ robey@lag.net-20080323020054-ar5bmythf7fr5rgk]
in the test that verifies key renegotiation during a large file "put", also do a "get" of the large file (with prefetch) to verify that nothing screwy happens.
Diffstat (limited to 'tests/test_sftp_big.py')
-rw-r--r--tests/test_sftp_big.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_sftp_big.py b/tests/test_sftp_big.py
index f711e4c7..1cafe931 100644
--- a/tests/test_sftp_big.py
+++ b/tests/test_sftp_big.py
@@ -372,6 +372,13 @@ class BigSFTPTest (unittest.TestCase):
self.assertEqual(sftp.stat('%s/hongry.txt' % FOLDER).st_size, 1024 * 1024)
self.assertNotEquals(t.H, t.session_id)
+
+ # try to read it too.
+ f = sftp.open('%s/hongry.txt' % FOLDER, 'r', 128 * 1024)
+ f.prefetch()
+ for i in xrange(32):
+ f.read(32 * 1024)
+ f.close()
finally:
sftp.remove('%s/hongry.txt' % FOLDER)
t.packetizer.REKEY_BYTES = pow(2, 30)