utils.algo: Add a function to insert a list into a list
[ganeti-local] / test / ganeti.ssh_unittest.py
index d999929..bd6c951 100755 (executable)
@@ -47,6 +47,12 @@ class TestKnownHosts(testutils.GanetiTestCase):
         "%s ssh-rsa %s\n" % (cfg.GetClusterName(),
                              mocks.FAKE_CLUSTER_KEY))
 
+  def testFormatParamikoFingerprintCorrect(self):
+    self.assertEqual(ssh.FormatParamikoFingerprint("C0Ffee"), "c0:ff:ee")
+
+  def testFormatParamikoFingerprintNotDividableByTwo(self):
+    self.assertRaises(AssertionError, ssh.FormatParamikoFingerprint, "C0Ffe")
+
 
 if __name__ == '__main__':
-  unittest.main()
+  testutils.GanetiTestProgram()