summaryrefslogtreecommitdiffhomepage
path: root/tests/test_sftp.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-10-23 11:31:03 -0700
committerJeff Forcier <jeff@bitprophet.org>2018-09-17 14:15:32 -0700
commit6a4233be4bcddf480dd3d5ef96cdc8f39ad16795 (patch)
tree71471d725b6ad0d95361bb8dece58781374c0372 /tests/test_sftp.py
parent6b96afd1d32316b0be3c28d3b5d298493086de27 (diff)
Import cleanup, mostly focused on s/tests/./
Diffstat (limited to 'tests/test_sftp.py')
-rwxr-xr-xtests/test_sftp.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py
index 624297c8..d3760bf7 100755
--- a/tests/test_sftp.py
+++ b/tests/test_sftp.py
@@ -33,15 +33,17 @@ from binascii import hexlify
from tempfile import mkstemp
import paramiko
+import paramiko.util
from paramiko.py3compat import PY2, b, u, StringIO
from paramiko.common import o777, o600, o666, o644
-from tests import skipUnlessBuiltin
-from tests.stub_sftp import StubServer, StubSFTPServer
-from tests.loop import LoopSocket
-from tests.util import _support
-import paramiko.util
from paramiko.sftp_attr import SFTPAttributes
+from .util import needs_builtin
+from .stub_sftp import StubServer, StubSFTPServer
+from .loop import LoopSocket
+from .util import _support
+
+
ARTICLE = '''
Insulin sensitivity and liver insulin receptor structure in ducks from two
genera
@@ -818,7 +820,7 @@ class SFTPTest (unittest.TestCase):
sftp_attributes = SFTPAttributes()
self.assertEqual(str(sftp_attributes), "?--------- 1 0 0 0 (unknown date) ?")
- @skipUnlessBuiltin('buffer')
+ @needs_builtin('buffer')
def test_write_buffer(self):
"""Test write() using a buffer instance."""
data = 3 * b'A potentially large block of data to chunk up.\n'
@@ -832,7 +834,7 @@ class SFTPTest (unittest.TestCase):
finally:
sftp.remove('%s/write_buffer' % FOLDER)
- @skipUnlessBuiltin('memoryview')
+ @needs_builtin('memoryview')
def test_write_memoryview(self):
"""Test write() using a memoryview instance."""
data = 3 * b'A potentially large block of data to chunk up.\n'