示例#1
0
文件: test_ssl.py 项目: xzy3/txaws
 def test_get_ca_certs_one_empty_path(self):
     certs = ssl.get_ca_certs(environ={
         "TXAWS_CERTS_PATH":
         "%s:%s" % (
             self.no_certs_dir,
             self.one_cert_dir,
         ),
     }, )
     self.assertEqual(len(certs), 1)
示例#2
0
文件: test_ssl.py 项目: xzy3/txaws
 def test_get_ca_certs_multiple_paths(self):
     certs = ssl.get_ca_certs(environ={
         "TXAWS_CERTS_PATH":
         "%s:%s" % (
             self.one_cert_dir,
             self.two_certs_dir,
         ),
     }, )
     self.assertEqual(len(certs), 3)
示例#3
0
文件: test_ssl.py 项目: xzy3/txaws
 def test_get_ca_certs_with_env_path(self):
     certs = ssl.get_ca_certs(
         environ={"TXAWS_CERTS_PATH": self.one_cert_dir}, )
     self.assertEqual(len(certs), 1)
示例#4
0
文件: test_ssl.py 项目: xzy3/txaws
 def test_get_ca_certs_with_default_path(self):
     self.patch(ssl, "DEFAULT_CERTS_PATH", self.two_certs_dir)
     certs = ssl.get_ca_certs()
     self.assertEqual(len(certs), 2)
示例#5
0
 def test_get_ca_certs_one_empty_path(self):
     os.environ["TXAWS_CERTS_PATH"] = "%s:%s" % (
         self.no_certs_dir, self.one_cert_dir)
     certs = ssl.get_ca_certs()
     self.assertEqual(len(certs), 1)
示例#6
0
 def test_get_ca_certs_multiple_paths(self):
     os.environ["TXAWS_CERTS_PATH"] = "%s:%s" % (
         self.one_cert_dir, self.two_certs_dir)
     certs = ssl.get_ca_certs()
     self.assertEqual(len(certs), 3)
示例#7
0
 def test_get_ca_certs_with_env_path(self):
     os.environ["TXAWS_CERTS_PATH"] = self.one_cert_dir
     certs = ssl.get_ca_certs()
     self.assertEqual(len(certs), 1)
示例#8
0
 def test_get_ca_certs_with_default_path(self):
     self.patch(ssl, "DEFAULT_CERTS_PATH", self.two_certs_dir)
     certs = ssl.get_ca_certs()
     self.assertEqual(len(certs), 2)