예제 #1
0
파일: test_x509.py 프로젝트: hynek/tnw
 def test_extractExtractsCorrectPublicKey(self):
     """
     extractPublicKey returns the correct public key.
     """
     pk = extractPublicKey(CERT)
     self.assertEqual(
         CERT_SHA256,
         hashlib.sha256(pk).hexdigest()
     )
예제 #2
0
 def test_extractExtractsCorrectPublicKey(self):
     """
     extractPublicKey returns the correct public key.
     """
     pk = extractPublicKey(CERT)
     self.assertEqual(CERT_SHA256, hashlib.sha256(pk).hexdigest())
예제 #3
0
파일: test_x509.py 프로젝트: hynek/tnw
 def test_extractReturnsBytes(self):
     """
     extractPublicKey returns a byte string.
     """
     pk = extractPublicKey(CERT)
     self.assertIsInstance(pk, bytes)
예제 #4
0
 def test_extractReturnsBytes(self):
     """
     extractPublicKey returns a byte string.
     """
     pk = extractPublicKey(CERT)
     self.assertIsInstance(pk, bytes)