Exemplo n.º 1
0
 def test_push_and_pop(self):
     crl_stack = X509.CRL_Stack()
     crl_a = X509.CRL()
     crl_b = X509.CRL()
     self.assertNotEqual(crl_a, crl_b)
     crl_stack.push(crl_a)
     crl_stack.push(crl_b)
     self.assertEquals(len(crl_stack), 2)
     popped_b = crl_stack.pop()
     self.assertEquals(crl_b, popped_b)
     self.assertEquals(len(crl_stack), 1)
     popped_a = crl_stack.pop()
     self.assertEqual(crl_a, popped_a)
     self.assertEqual(len(crl_stack), 0)
 def test_new(self):
     crl = X509.CRL()
     self.assertEqual(crl.as_text()[:34],
                      'Certificate Revocation List (CRL):')