pytest-sftpserver
pytest-sftpserver copied to clipboard
How to mock wrong credentials?
class AllowAllAuthHandler(ServerInterface):
def check_auth_none(self, username):
return AUTH_SUCCESSFUL
def check_auth_password(self, username, password):
return AUTH_SUCCESSFUL
def check_auth_publickey(self, username, key):
return AUTH_SUCCESSFUL
def check_channel_request(self, kind, chanid):
return OPEN_SUCCEEDED
As you can see it allows any username password combinations, so it's difficult to mock wrong credentials.