def testGetPublicKeyFromByteString(self):
    bytes = 'bytes'
    publickey = 'publickey'

    self.mox.StubOutClassWithMocks(x509.tlslite_bridge, 'X509')
    mock_tls509 = x509.tlslite_bridge.X509()
    mock_tls509.parseBinary(bytes).AndReturn(None)
    mock_tls509.publicKey = publickey

    self.mox.ReplayAll()
    self.assertEqual(
        {'public_key': publickey},
        self.x._GetPublicKeyFromByteString(bytes))
    self.mox.VerifyAll()
Test _GetPublicKeyFromByteString().
dataset/ETHPy150Open google/simian/src/tests/simian/auth/x509_test.py/X509CertificateTest.testGetPublicKeyFromByteString