Skip to content

Commit

Permalink
Add quick test re paramiko#131
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Sep 5, 2014
1 parent f4de330 commit e5fc6a6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_sftp.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,26 @@ def test_7_listdir(self):
sftp.remove(FOLDER + '/fish.txt')
sftp.remove(FOLDER + '/tertiary.py')

def test_7_5_listdir_iter(self):
"""
listdir_iter version of above test
"""
try:
sftp.open(FOLDER + '/duck.txt', 'w').close()
sftp.open(FOLDER + '/fish.txt', 'w').close()
sftp.open(FOLDER + '/tertiary.py', 'w').close()

x = [x.filename for x in sftp.listdir_iter(FOLDER)]
self.assertEqual(len(x), 3)
self.assertTrue('duck.txt' in x)
self.assertTrue('fish.txt' in x)
self.assertTrue('tertiary.py' in x)
self.assertTrue('random' not in x)
finally:
sftp.remove(FOLDER + '/duck.txt')
sftp.remove(FOLDER + '/fish.txt')
sftp.remove(FOLDER + '/tertiary.py')

def test_8_setstat(self):
"""
verify that the setstat functions (chown, chmod, utime, truncate) work.
Expand Down

0 comments on commit e5fc6a6

Please sign in to comment.