summaryrefslogtreecommitdiff
path: root/tests/test_auth.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-03-18 08:29:07 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-03-18 08:29:07 -0400
commita282ec1ee7c9d02108a73248fa51cc06fbb6e1ce (patch)
treea054bda57d65212daca5e9a536f1e6d0ab7a742a /tests/test_auth.py
parent7a03c6568870bd209fba70a7302be7e12f33847c (diff)
downloadparamiko-a282ec1ee7c9d02108a73248fa51cc06fbb6e1ce.tar.gz
doh
Diffstat (limited to 'tests/test_auth.py')
-rw-r--r--tests/test_auth.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_auth.py b/tests/test_auth.py
index ec78e3ce..23517790 100644
--- a/tests/test_auth.py
+++ b/tests/test_auth.py
@@ -83,13 +83,13 @@ class NullServer (ServerInterface):
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'):
@@ -111,7 +111,7 @@ class AuthTest (unittest.TestCase):
self.ts.close()
self.socks.close()
self.sockc.close()
-
+
def start_server(self):
host_key = RSAKey.from_private_key_file(test_path('test_rsa.key'))
self.public_host_key = RSAKey(data=host_key.asbytes())
@@ -120,7 +120,7 @@ class AuthTest (unittest.TestCase):
self.server = NullServer()
self.assertTrue(not self.event.is_set())
self.ts.start_server(self.event, self.server)
-
+
def verify_finished(self):
self.event.wait(1.0)
self.assertTrue(self.event.is_set())
@@ -156,7 +156,7 @@ class AuthTest (unittest.TestCase):
self.assertTrue(issubclass(etype, AuthenticationException))
self.tc.auth_password(username='slowdive', password='pygmalion')
self.verify_finished()
-
+
def test_3_multipart_auth(self):
"""
verify that multipart auth works.
@@ -187,7 +187,7 @@ class AuthTest (unittest.TestCase):
self.assertEqual(self.got_prompts, [('Password', False)])
self.assertEqual([], remain)
self.verify_finished()
-
+
def test_5_interactive_auth_fallback(self):
"""
verify that a password auth attempt will fallback to "interactive"