summaryrefslogtreecommitdiffhomepage
path: root/tests/test_sftp.py
diff options
context:
space:
mode:
authorScott Maxwell <scott@codecobblers.com>2014-03-07 20:45:26 -0800
committerScott Maxwell <scott@codecobblers.com>2014-03-07 20:45:26 -0800
commitf0017b83309899bf6fffc0fa90093c36f1a7f7ea (patch)
tree582d35dee4b32f022bddc2245731a76112f7ac8e /tests/test_sftp.py
parent073c71a8223ff77cacd8c555ef63ce24f0c3d50c (diff)
Fix import * and a bunch of PEP8 formatting
Diffstat (limited to 'tests/test_sftp.py')
-rwxr-xr-xtests/test_sftp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index 82422019..6417ac90 100755
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -32,7 +32,8 @@ import unittest
from tempfile import mkstemp
import paramiko
-from paramiko.common import PY2, b, u, StringIO, o777, o600
+from paramiko.py3compat import PY2, b, u, StringIO
+from paramiko.common import o777, o600, o666, o644
from tests.stub_sftp import StubServer, StubSFTPServer
from tests.loop import LoopSocket
from tests.util import test_path
@@ -554,6 +555,7 @@ class SFTPTest (unittest.TestCase):
with open(localname, 'wb') as f:
f.write(text)
saved_progress = []
+
def progress_callback(x, y):
saved_progress.append((x, y))
sftp.put(localname, FOLDER + '/bunny.txt', progress_callback)
@@ -663,6 +665,7 @@ class SFTPTest (unittest.TestCase):
with open(localname, 'w') as f:
f.write(text)
saved_progress = []
+
def progress_callback(x, y):
saved_progress.append((x, y))
res = sftp.put(localname, FOLDER + '/bunny.txt', progress_callback, False)