'Test that Key objects are compared correctly.'

def test_equal(self):

    rsa1 = keys.Key(self.rsaObj)
    rsa2 = keys.Key(self.rsaObj)
    rsa3 = keys.Key(keys.Key._fromRSAComponents(n=long(5), e=long(3))._keyObject)
    dsa = keys.Key(self.dsaObj)
    self.assertTrue((rsa1 == rsa2))
    self.assertFalse((rsa1 == rsa3))
    self.assertFalse((rsa1 == dsa))
    self.assertFalse((rsa1 == object))
    self.assertFalse((rsa1 == None))
