So this will unfortunately be a PR from a branch I'm working on which will contain various separate changes. So first of all sorry for not creating separate pull requests.
This PR is still in progress but i've already openend it too give some information where I'm working on. It roughly contains the following changes:
Add a virtual root for sftp server. I am combing that with the tmpdir fixture from pytest which results in a pretty awesome test flow :-)
Add support for passphrases
This results in the following code snippet:
@fixture
def sftp_users():
return {
'labdigital': {
'key': os.path.join(os.path.dirname(__file__), 'files', 'test_key'),
'passphrase': 'testtest',
}
}
@fixture
def server(sftp_users, tmpdir):
with mockssh.Server(root=tmpdir.join('sftp').mkdir().strpath) as s:
for user, credentials in sftp_users.items():
s.add_user(user, credentials['key'], credentials['passphrase'])
yield s
Hi,
So this will unfortunately be a PR from a branch I'm working on which will contain various separate changes. So first of all sorry for not creating separate pull requests.
This PR is still in progress but i've already openend it too give some information where I'm working on. It roughly contains the following changes:
This results in the following code snippet: