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