summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py12
1 files changed, 11 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.