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

def test_keyObjectSetDSAPublic(self):

    key = keys.Key.fromString(keydata.publicRSA_openssh)
    newPyCryptoKey = Crypto.PublicKey.DSA.construct((keydata.DSAData['y'], keydata.DSAData['g'], keydata.DSAData['p'], keydata.DSAData['q']))
    self.assertEqual('RSA', key.type())
    key.keyObject = newPyCryptoKey
    self.assertEqual('DSA', key.type())
    self.assertEqual({'y': keydata.DSAData['y'], 'g': keydata.DSAData['g'], 'p': keydata.DSAData['p'], 'q': keydata.DSAData['q']}, key.data())
