summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/conftest.py12
-rw-r--r--tests/test_util.py1
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index b4095a3c..a90000fe 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -4,7 +4,7 @@ import shutil
import threading
import pytest
-from paramiko import RSAKey, SFTPServer, SFTP, Transport
+from paramiko import RSAKey, SFTPServer, SFTP, Transport, Authenticator
from ._loop import LoopSocket
from ._stub_sftp import StubServer, StubSFTPServer
@@ -62,6 +62,16 @@ def trans():
sockc.close()
+@pytest.fixture
+def authn(trans):
+ """
+ Yields an `Authenticator` wrapping a `Transport` (from `trans`.)
+ """
+ # TODO: call start_client() on the trans too? or push that into
+ # `Authenticator` itself?
+ yield Authenticator(trans)
+
+
def make_sftp_folder():
"""
Ensure expected target temp folder exists on the remote end.
diff --git a/tests/test_util.py b/tests/test_util.py
index 5db06dae..3385c5ac 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -73,6 +73,7 @@ class UtilTest(unittest.TestCase):
Agent
AgentKey
AuthenticationException
+ Authenticator
AutoAddPolicy
BadAuthenticationType
BufferedFile