Exemplo n.º 1
0
 def test_get_cert_file(self):
     '''
     Test - Get the details of the certificate file.
     '''
     kwargs = {'name': CERT_PATH}
     with patch.dict(win_pki.__salt__):
         self.assertEqual(win_pki.get_cert_file(**kwargs), CERTS[THUMBPRINT])
Exemplo n.º 2
0
 def test_get_cert_file(self):
     '''
     Test - Get the details of the certificate file.
     '''
     kwargs = {'name': CERT_PATH}
     with patch.dict(win_pki.__salt__):
         self.assertEqual(win_pki.get_cert_file(**kwargs),
                          CERTS[THUMBPRINT])
Exemplo n.º 3
0
 def test_get_cert_file(self):
     """
     Test - Get the details of the certificate file.
     """
     kwargs = {"name": CERT_PATH}
     with patch.dict(win_pki.__salt__), patch(
         "os.path.isfile", MagicMock(return_value=True)
     ), patch("salt.modules.win_pki._cmd_run", MagicMock(return_value=JSON_CERTS)):
         self.assertEqual(win_pki.get_cert_file(**kwargs), CERTS[THUMBPRINT])
Exemplo n.º 4
0
 def test_get_cert_file(self):
     '''
     Test - Get the details of the certificate file.
     '''
     kwargs = {'name': CERT_PATH}
     with patch.dict(win_pki.__salt__), \
             patch('os.path.isfile',
                  MagicMock(return_value=True)), \
             patch('salt.modules.win_pki._cmd_run',
                   MagicMock(return_value=JSON_CERTS)):
         self.assertEqual(win_pki.get_cert_file(**kwargs), CERTS[THUMBPRINT])