Example #1
0
 def test_create_should_raise_description_not_defined(self):
     del self.subca_data['description']
     authority_data = authority.AuthorityData(**self.subca_data)
     self.assertRaises(ValueError, self.authority_client.create_ca,
                       authority_data)
Example #2
0
 def test_create_should_raise_parent_aid_not_defined(self):
     del self.subca_data["parent_aid"]
     authority_data = authority.AuthorityData(**self.subca_data)
     self.assertRaises(ValueError, self.authority_client.create_ca,
                       authority_data)
Example #3
0
 def test_should_create_subca(self):
     authority_data = authority.AuthorityData(**self.subca_data)
     ca = self.authority_client.create_ca(authority_data)
     self.assertEqual(ca.aid, self.aid)
     self.assertEqual(ca.dn, self.dn)