diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-06-01 13:57:03 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-06-01 13:57:03 -0700 |
commit | 327d17c79bcc531d5f7564592994807d1fb91cca (patch) | |
tree | ce4df18912c0661fcc9314a24fde68ed2ab37294 /tests | |
parent | 6cc003d5aea99d981ab3ec4d0a26839c5d94604a (diff) | |
parent | f645c57889e5faf20c0849c74e57eb5e626cc67a (diff) |
Merge branch '2.0' into 2.1
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_hostkeys.py | 12 | ||||
-rw-r--r-- | tests/test_ssh_gss.py | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/tests/test_hostkeys.py b/tests/test_hostkeys.py index 2bdcad9c..2c7ceeb9 100644 --- a/tests/test_hostkeys.py +++ b/tests/test_hostkeys.py @@ -115,3 +115,15 @@ class HostKeysTest (unittest.TestCase): self.assertEqual(b'7EC91BB336CB6D810B124B1353C32396', fp) fp = hexlify(hostdict['secure.example.com']['ssh-dss'].get_fingerprint()).upper() self.assertEqual(b'4478F0B9A23CC5182009FF755BC1D26C', fp) + + def test_delitem(self): + hostdict = paramiko.HostKeys('hostfile.temp') + target = 'happy.example.com' + entry = hostdict[target] # will KeyError if not present + del hostdict[target] + try: + entry = hostdict[target] + except KeyError: + pass # Good + else: + assert False, "Entry was not deleted from HostKeys on delitem!" diff --git a/tests/test_ssh_gss.py b/tests/test_ssh_gss.py index e20d348f..967b3b81 100644 --- a/tests/test_ssh_gss.py +++ b/tests/test_ssh_gss.py @@ -43,9 +43,7 @@ class NullServer (paramiko.ServerInterface): return paramiko.AUTH_FAILED def enable_auth_gssapi(self): - UseGSSAPI = True - GSSAPICleanupCredentials = True - return UseGSSAPI + return True def check_channel_request(self, kind, chanid): return paramiko.OPEN_SUCCEEDED |