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)
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)
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)