def test_all(self): d = self.tmpdir() path = os.path.join(d, "foo/cert.cnf") assert certutils.dummy_ca(path) assert os.path.exists(path) path = os.path.join(d, "foo/cert2.pem") assert certutils.dummy_ca(path) assert os.path.exists(path) assert os.path.exists(os.path.join(d, "foo/cert2-cert.pem")) assert os.path.exists(os.path.join(d, "foo/cert2-cert.p12"))
def test_with_ca(self): d = self.tmpdir() cacert = os.path.join(d, "foo/cert.cnf") assert certutils.dummy_ca(cacert) p = certutils.dummy_cert(os.path.join(d, "foo"), cacert, "foo.com", ["one.com", "two.com", "*.three.com"]) assert os.path.exists(p) # Short-circuit assert certutils.dummy_cert(os.path.join(d, "foo"), cacert, "foo.com", [])
def test_with_ca(self): d = self.tmpdir() cacert = os.path.join(d, "foo/cert.cnf") assert certutils.dummy_ca(cacert) p = certutils.dummy_cert( os.path.join(d, "foo"), cacert, "foo.com", ["one.com", "two.com", "*.three.com"] ) assert os.path.exists(p) # Short-circuit assert certutils.dummy_cert( os.path.join(d, "foo"), cacert, "foo.com", [] )