Ejemplo n.º 1
0
 def test_export_cert(self):
     '''
     Test - Export the certificate to a file from the given certificate store.
     '''
     kwargs = {'name': CERT_PATH, 'thumbprint': THUMBPRINT}
     with patch.dict(win_pki.__salt__):
         self.assertTrue(win_pki.export_cert(**kwargs))
Ejemplo n.º 2
0
 def test_export_cert(self):
     '''
     Test - Export the certificate to a file from the given certificate store.
     '''
     kwargs = {'name': CERT_PATH,
               'thumbprint': THUMBPRINT}
     with patch.dict(win_pki.__salt__):
         self.assertTrue(win_pki.export_cert(**kwargs))
Ejemplo n.º 3
0
 def test_export_cert(self):
     """
     Test - Export the certificate to a file from the given certificate store.
     """
     kwargs = {"name": CERT_PATH, "thumbprint": THUMBPRINT}
     with patch.dict(win_pki.__salt__), patch(
             "salt.modules.win_pki._cmd_run",
             MagicMock(return_value="True")), patch(
                 "salt.modules.win_pki._validate_cert_format",
                 MagicMock(return_value=None)), patch(
                     "salt.modules.win_pki._validate_cert_path",
                     MagicMock(return_value=None)):
         self.assertTrue(win_pki.export_cert(**kwargs))
Ejemplo n.º 4
0
 def test_export_cert(self):
     '''
     Test - Export the certificate to a file from the given certificate store.
     '''
     kwargs = {'name': CERT_PATH, 'thumbprint': THUMBPRINT}
     with patch.dict(win_pki.__salt__), \
             patch('salt.modules.win_pki._cmd_run',
                   MagicMock(return_value='True')), \
             patch('salt.modules.win_pki._validate_cert_format',
                   MagicMock(return_value=None)), \
             patch('salt.modules.win_pki._validate_cert_path',
                   MagicMock(return_value=None)):
         self.assertTrue(win_pki.export_cert(**kwargs))