Exemplo n.º 1
0
 def test_remove_cert_binding(self):
     '''
     Test - Remove a certificate from an IIS binding.
     '''
     kwargs = {'name': 'FFFEEEDDDCCCBBBAAA0001112233445566778899',
               'site': 'MyOtherTestSite', 'hostheader': 'myothertestsite.local',
               'ipaddress': '*', 'port': 443}
     with patch.dict(win_iis.__salt__):
         self.assertTrue(win_iis.remove_cert_binding(**kwargs))
Exemplo n.º 2
0
 def test_remove_cert_binding(self):
     '''
     Test - Remove a certificate from an IIS binding.
     '''
     kwargs = {'name': 'FFFEEEDDDCCCBBBAAA0001112233445566778899',
               'site': 'MyOtherTestSite', 'hostheader': 'myothertestsite.local',
               'ipaddress': '*', 'port': 443}
     with patch.dict(win_iis.__salt__), \
             patch('salt.modules.win_iis._srvmgr',
                   MagicMock(return_value={'retcode': 0})), \
             patch('salt.modules.win_iis.list_cert_bindings',
                   MagicMock(return_value={CERT_BINDING_INFO: BINDING_LIST[CERT_BINDING_INFO]})):
         self.assertTrue(win_iis.remove_cert_binding(**kwargs))
Exemplo n.º 3
0
 def test_remove_cert_binding(self):
     """
     Test - Remove a certificate from an IIS binding.
     """
     kwargs = {
         "name": "FFFEEEDDDCCCBBBAAA0001112233445566778899",
         "site": "MyOtherTestSite",
         "hostheader": "myothertestsite.local",
         "ipaddress": "*",
         "port": 443,
     }
     with patch.dict(win_iis.__salt__), patch(
             "salt.modules.win_iis._srvmgr",
             MagicMock(return_value={"retcode": 0})), patch(
                 "salt.modules.win_iis.list_cert_bindings",
                 MagicMock(
                     return_value={
                         CERT_BINDING_INFO: BINDING_LIST[CERT_BINDING_INFO]
                     }),
             ):
         self.assertTrue(win_iis.remove_cert_binding(**kwargs))