summaryrefslogtreecommitdiffhomepage
path: root/tests/test_sftp.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2014-04-24 09:34:00 -0700
committerJeff Forcier <jeff@bitprophet.org>2014-04-24 09:34:00 -0700
commit1321bc41dfe76a01c98f50c91e429eb69b06ed5e (patch)
treebeb74ec5cbd37091c7dd6a2cd2bbd12fdbdd3740 /tests/test_sftp.py
parenta1d291e04777fb963c1ac76d0d77b3ff7fe0732b (diff)
parentae30b31721fc461c46fc23b768703a3f29ee9939 (diff)
Merge branch '1.13'
Diffstat (limited to 'tests/test_sftp.py')
-rwxr-xr-xtests/test_sftp.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index e0534eb0..720b8215 100755
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -405,7 +405,7 @@ class SFTPTest (unittest.TestCase):
self.assertEqual(sftp.stat(FOLDER + '/testing.txt').st_size, 13)
with sftp.open(FOLDER + '/testing.txt', 'r') as f:
data = f.read(20)
- self.assertEqual(data, 'hello kiddy.\n')
+ self.assertEqual(data, b'hello kiddy.\n')
finally:
sftp.remove(FOLDER + '/testing.txt')
@@ -466,8 +466,8 @@ class SFTPTest (unittest.TestCase):
f.write('?\n')
with sftp.open(FOLDER + '/happy.txt', 'r') as f:
- self.assertEqual(f.readline(), 'full line?\n')
- self.assertEqual(f.read(7), 'partial')
+ self.assertEqual(f.readline(), u'full line?\n')
+ self.assertEqual(f.read(7), b'partial')
finally:
try:
sftp.remove(FOLDER + '/happy.txt')
@@ -662,8 +662,8 @@ class SFTPTest (unittest.TestCase):
fd, localname = mkstemp()
os.close(fd)
- text = 'All I wanted was a plastic bunny rabbit.\n'
- with open(localname, 'w') as f:
+ text = b'All I wanted was a plastic bunny rabbit.\n'
+ with open(localname, 'wb') as f:
f.write(text)
saved_progress = []