def test_set_container_setting(self): ''' Test - Set the value of the setting for an IIS container. ''' kwargs = {'name': 'MyTestSite', 'container': 'AppPools', 'settings': {'managedPipelineMode': 'Integrated'}} with patch.dict(win_iis.__salt__): self.assertTrue(win_iis.set_container_setting(**kwargs))
def test_set_container_setting(self): ''' Test - Set the value of the setting for an IIS container. ''' kwargs = {'name': 'MyTestSite', 'container': 'AppPools', 'settings': {'managedPipelineMode': 'Integrated'}} with patch.dict(win_iis.__salt__), \ patch('salt.modules.win_iis._srvmgr', MagicMock(return_value={'retcode': 0})), \ patch('salt.modules.win_iis.get_container_setting', MagicMock(return_value={'managedPipelineMode': 'Integrated'})): self.assertTrue(win_iis.set_container_setting(**kwargs))
def test_set_container_setting(self): """ Test - Set the value of the setting for an IIS container. """ kwargs = { "name": "MyTestSite", "container": "AppPools", "settings": { "managedPipelineMode": "Integrated" }, } with patch.dict(win_iis.__salt__), patch( "salt.modules.win_iis._srvmgr", MagicMock(return_value={"retcode": 0})), patch( "salt.modules.win_iis.get_container_setting", MagicMock( return_value={"managedPipelineMode": "Integrated"}), ): self.assertTrue(win_iis.set_container_setting(**kwargs))