diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2018-03-12 17:51:13 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2018-05-03 18:12:58 -0700 |
commit | 91cbbfc17fb8f38ea6e86bb39e36acd407ef3cef (patch) | |
tree | e23780b5f66346a9c662042a5ab211609947df01 /tests/conftest.py | |
parent | 6906398c39364d63781acf8e02f9333292afb03a (diff) | |
download | paramiko-auth-shakeup.tar.gz |
WIPauth-shakeup
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 12 |
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. |