From 419b11b74118e27b8f71bdc695d0112cd0e3f378 Mon Sep 17 00:00:00 2001 From: Robey Pointer Date: Sat, 22 Mar 2008 19:00:54 -0700 Subject: [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. --- tests/test_sftp_big.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test_sftp_big.py') 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) -- cgit v1.2.3