예제 #1
0
 def test_set_ca_cert_path(self):
     """
     Test for setting the cert base path
     """
     ca_path = "/tmp/ca_cert_test_path"
     mock_opt = MagicMock(return_value="/etc/tls")
     ret = {"ca.contextual_cert_base_path": "/tmp/ca_cert_test_path"}
     with patch.dict(tls.__salt__, {"config.option": mock_opt}):
         tls.set_ca_path(ca_path)
         self.assertEqual(tls.__context__, ret)
예제 #2
0
파일: test_tls.py 프로젝트: vindir/salt
 def test_set_ca_cert_path(self):
     '''
     Test for setting the cert base path
     '''
     ca_path = '/tmp/ca_cert_test_path'
     mock_opt = MagicMock(return_value='/etc/tls')
     ret = {'ca.contextual_cert_base_path': '/tmp/ca_cert_test_path'}
     with patch.dict(tls.__salt__, {'config.option': mock_opt}):
         tls.set_ca_path(ca_path)
         self.assertEqual(tls.__context__, ret)
예제 #3
0
 def test_set_ca_cert_path(self):
     '''
     Test for setting the cert base path
     '''
     ca_path = '/tmp/ca_cert_test_path'
     mock_opt = MagicMock(return_value='/etc/tls')
     ret = {'ca.contextual_cert_base_path': '/tmp/ca_cert_test_path'}
     with patch.dict(tls.__salt__, {'config.option': mock_opt}):
         tls.set_ca_path(ca_path)
         self.assertEqual(tls.__context__, ret)