summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2008-01-23 17:41:21 -0800
committerRobey Pointer <robey@lag.net>2008-01-23 17:41:21 -0800
commit953392c0a107a087a774e0cc62101c2e541c8ef3 (patch)
treeb7125e26bafe7072e8fd8793b04833e15e20d4f5
parent31544301f5a57840d97e2bf94a6fcf358ad7c47a (diff)
[project @ robey@lag.net-20080124014121-95bt9p4n4k8lw72i]
remove some now-unneeded code.
-rw-r--r--tests/test_transport.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/test_transport.py b/tests/test_transport.py
index f0dbed37..5ba4acc1 100644
--- a/tests/test_transport.py
+++ b/tests/test_transport.py
@@ -43,49 +43,11 @@ class NullServer (ServerInterface):
def get_allowed_auths(self, username):
if username == 'slowdive':
return 'publickey,password'
- if username == 'paranoid':
- if not self.paranoid_did_password and not self.paranoid_did_public_key:
- return 'publickey,password'
- elif self.paranoid_did_password:
- return 'publickey'
- else:
- return 'password'
- if username == 'commie':
- return 'keyboard-interactive'
return 'publickey'
def check_auth_password(self, username, password):
if (username == 'slowdive') and (password == 'pygmalion'):
return AUTH_SUCCESSFUL
- if (username == 'paranoid') and (password == 'paranoid'):
- # 2-part auth (even openssh doesn't support this)
- self.paranoid_did_password = True
- if self.paranoid_did_public_key:
- return AUTH_SUCCESSFUL
- return AUTH_PARTIALLY_SUCCESSFUL
- if (username == 'utf8') and (password == u'\u2022'.encode('utf-8')):
- return AUTH_SUCCESSFUL
- return AUTH_FAILED
-
- def check_auth_publickey(self, username, key):
- if (username == 'paranoid') and (key == self.paranoid_key):
- # 2-part auth
- self.paranoid_did_public_key = True
- if self.paranoid_did_password:
- return AUTH_SUCCESSFUL
- return AUTH_PARTIALLY_SUCCESSFUL
- return AUTH_FAILED
-
- def check_auth_interactive(self, username, submethods):
- if username == 'commie':
- self.username = username
- return InteractiveQuery('password', 'Please enter a password.', ('Password', False))
- return AUTH_FAILED
-
- def check_auth_interactive_response(self, responses):
- if self.username == 'commie':
- if (len(responses) == 1) and (responses[0] == 'cat'):
- return AUTH_SUCCESSFUL
return AUTH_FAILED
def check_channel_request(self, kind, chanid):