Пример #1
0
 def test_get_container_setting(self):
     '''
     Test - Get the value of the setting for the IIS container.
     '''
     kwargs = {'name': 'MyTestSite', 'container': 'AppPools',
               'settings': ['managedPipelineMode']}
     with patch.dict(win_iis.__salt__):
         self.assertEqual(win_iis.get_container_setting(**kwargs),
                          {'managedPipelineMode': 'Integrated'})
Пример #2
0
 def test_get_container_setting(self):
     '''
     Test - Get the value of the setting for the IIS container.
     '''
     kwargs = {'name': 'MyTestSite', 'container': 'AppPools',
               'settings': ['managedPipelineMode']}
     with patch.dict(win_iis.__salt__), \
             patch('salt.modules.win_iis._srvmgr',
                   MagicMock(return_value=CONTAINER_SETTING)):
         self.assertEqual(win_iis.get_container_setting(**kwargs),
                          {'managedPipelineMode': 'Integrated'})
Пример #3
0
 def test_get_container_setting(self):
     """
     Test - Get the value of the setting for the IIS container.
     """
     kwargs = {
         "name": "MyTestSite",
         "container": "AppPools",
         "settings": ["managedPipelineMode"],
     }
     with patch.dict(win_iis.__salt__), patch(
             "salt.modules.win_iis._srvmgr",
             MagicMock(return_value=CONTAINER_SETTING)):
         self.assertEqual(
             win_iis.get_container_setting(**kwargs),
             {"managedPipelineMode": "Integrated"},
         )