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

def test_keyObjectSetRSAPublic(self):

    key = keys.Key.fromString(keydata.publicDSA_openssh)
    newPyCryptoKey = Crypto.PublicKey.RSA.construct((keydata.RSAData['n'], keydata.RSAData['e']))
    self.assertEqual('DSA', key.type())
    key.keyObject = newPyCryptoKey
    [warning] = self.flushWarnings([KeyKeyObjectTests.test_keyObjectSetRSAPublic])
    self.assertIs(warning['category'], DeprecationWarning)
    self.assertEqual('RSA', key.type())
    self.assertEqual({'n': keydata.RSAData['n'], 'e': keydata.RSAData['e']}, key.data())
