diff options
author | Scott Maxwell <scott@codecobblers.com> | 2013-10-30 16:22:52 -0700 |
---|---|---|
committer | Scott Maxwell <scott@codecobblers.com> | 2013-10-30 16:22:52 -0700 |
commit | 644c52266caaa5b975a13e355d1bfd921c9c9ddb (patch) | |
tree | d6525a0626c82cb34256b678ae3fbbe145916a57 /tests/test_auth.py | |
parent | 66cfa97cce92b1d60383d178887b18dddb999fc1 (diff) |
Use test_path to avoid relative path issues
Diffstat (limited to 'tests/test_auth.py')
-rw-r--r-- | tests/test_auth.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_auth.py b/tests/test_auth.py index 1e247d70..ea9b2bdd 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -36,8 +36,8 @@ from tests.util import test_path class NullServer (ServerInterface): paranoid_did_password = False paranoid_did_public_key = False - paranoid_key = DSSKey.from_private_key_file('tests/test_dss.key') - + paranoid_key = DSSKey.from_private_key_file(test_path('test_dss.key')) + def get_allowed_auths(self, username): if username == 'slowdive': return 'publickey,password' @@ -111,8 +111,8 @@ class AuthTest (unittest.TestCase): self.sockc.close() def start_server(self): - host_key = RSAKey.from_private_key_file('tests/test_rsa.key') self.public_host_key = RSAKey(data=str(host_key)) + host_key = RSAKey.from_private_key_file(test_path('test_rsa.key')) self.ts.add_server_key(host_key) self.event = threading.Event() self.server = NullServer() @@ -163,7 +163,7 @@ class AuthTest (unittest.TestCase): self.tc.connect(hostkey=self.public_host_key) remain = self.tc.auth_password(username='paranoid', password='paranoid') self.assertEquals(['publickey'], remain) - key = DSSKey.from_private_key_file('tests/test_dss.key') + key = DSSKey.from_private_key_file(test_path('test_dss.key')) remain = self.tc.auth_publickey(username='paranoid', key=key) self.assertEquals([], remain) self.verify_finished() |