'Setting the L{keys.Key.keyObject} property to a PyCrypto private RSA
key instance updates the internal key.'

def test_keyObjectSetRSAPrivate(self):

    key = keys.Key.fromString(keydata.publicDSA_openssh)
    newPyCryptoKey = Crypto.PublicKey.RSA.construct((keydata.RSAData['n'], keydata.RSAData['e'], keydata.RSAData['d'], keydata.RSAData['p'], keydata.RSAData['q'], keydata.RSAData['u']))
    self.assertEqual('DSA', key.type())
    key.keyObject = newPyCryptoKey
    self.assertEqual('RSA', key.type())
    self.assertEqual({'n': keydata.RSAData['n'], 'e': keydata.RSAData['e'], 'd': keydata.RSAData['d'], 'p': keydata.RSAData['p'], 'q': keydata.RSAData['q'], 'u': keydata.RSAData['u']}, key.data())
