def test_remove_binding(self): ''' Test - Remove an IIS binding. ''' kwargs = {'site': 'MyTestSite', 'hostheader': 'myothertestsite.local', 'ipaddress': '*', 'port': 443} with patch.dict(win_iis.__salt__): self.assertTrue(win_iis.remove_binding(**kwargs))
def test_remove_binding(self): ''' Test - Remove an IIS binding. ''' kwargs = {'site': 'MyTestSite', '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_bindings', MagicMock(return_value=BINDING_LIST)): self.assertTrue(win_iis.remove_binding(**kwargs))
def test_remove_binding(self): """ Test - Remove an IIS binding. """ kwargs = { "site": "MyTestSite", "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_bindings", MagicMock(return_value=BINDING_LIST)): self.assertTrue(win_iis.remove_binding(**kwargs))