Esempio n. 1
0
 def test_private_key_does_not_match2(self):
     with self.assertRaises(Exception) as ctx:
         SshKeyManager.check_public_key(self.priv_key2, self.pub_key)
     self.assertEqual(str(ctx.exception), 'private key does not match')
Esempio n. 2
0
 def test_public_key_not_set(self):
     with self.assertRaises(Exception) as ctx:
         SshKeyManager.check_public_key(None, None)
     self.assertEqual(str(ctx.exception), 'no public key set')