diff options
Diffstat (limited to 'tests/test_sftp.py')
-rw-r--r-- | tests/test_sftp.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/test_sftp.py b/tests/test_sftp.py index 84c5252b..1d6048bb 100644 --- a/tests/test_sftp.py +++ b/tests/test_sftp.py @@ -34,11 +34,7 @@ import pytest from paramiko.py3compat import PY2, b, u, StringIO from paramiko.common import o777, o600, o666, o644 -from tests import requireNonAsciiLocale, skipUnlessBuiltin -from tests.stub_sftp import StubServer, StubSFTPServer -from tests.loop import LoopSocket -from tests.util import test_path -import paramiko.util +from tests import requireNonAsciiLocale from paramiko.sftp_attr import SFTPAttributes from .util import needs_builtin @@ -276,14 +272,14 @@ class TestSFTP(object): sftp.remove(sftp.FOLDER + "/tertiary.py") @requireNonAsciiLocale() - def test_listdir_in_locale(self): + def test_listdir_in_locale(self, sftp): """Test listdir under a locale that uses non-ascii text.""" - sftp.open(FOLDER + '/canard.txt', 'w').close() + sftp.open(sftp.FOLDER + '/canard.txt', 'w').close() try: - folder_contents = sftp.listdir(FOLDER) + folder_contents = sftp.listdir(sftp.FOLDER) self.assertEqual(['canard.txt'], folder_contents) finally: - sftp.remove(FOLDER + '/canard.txt') + sftp.remove(sftp.FOLDER + '/canard.txt') def test_setstat(self, sftp): """ @@ -797,7 +793,7 @@ class TestSFTP(object): sftp.remove("%s/nonutf8data" % sftp.FOLDER) @requireNonAsciiLocale('LC_TIME') - def test_sftp_attributes_locale_time(self): + def test_sftp_attributes_locale_time(self, sftp): """Test SFTPAttributes under a locale with non-ascii time strings.""" some_stat = os.stat(sftp.FOLDER) sftp_attributes = SFTPAttributes.from_stat(some_stat, u('a_directory')) |