Ejemplo n.º 1
0
 def test_certificate_loading(self):
     """Load a cert into our test"""
     idobj = IdentityDB()
     idobj.args = self.idobj["args"]
     idobj.load_certs_from_directory(self.certdir, self.cabundle)
     for identity in ("r1", "r2", "r3"):
         assert identity in [
             x[0] for x in self.session.query(Recipient.name).all()
         ]
Ejemplo n.º 2
0
 def test_key_loading(self):
     """Load a key into our test"""
     idobj = IdentityDB()
     idobj.args = self.idobj["args"]
     idobj.load_keys_from_directory(self.keydir)
     for identity in ("r1", "r2", "r3"):
         assert identity in [
             x[0] for x in self.session.query(Recipient.name).all()
         ]
         test_id = (self.session.query(Recipient).filter(
             Recipient.name == identity).first())
         assert os.path.isfile(test_id.key)