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])
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])
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])