summaryrefslogtreecommitdiff
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>2017-10-23 11:31:03 -0700
commit385856db1bd2a2db7c5dd922a6e74d8e63082303 (patch)
tree278287470408c016b51ee21d9fcd50bc7569b6a0 /tests/test_sftp.py
parentb9ff5f3e4b11a7b8928e51629df0bfde4c6ebe53 (diff)
downloadparamiko-385856db1bd2a2db7c5dd922a6e74d8e63082303.tar.gz
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 7264baeb..518efd83 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
@@ -849,7 +851,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'
@@ -863,7 +865,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'