def test_create_binding(self): ''' Test - Create an IIS binding. ''' kwargs = {'site': 'MyTestSite', 'hostheader': '', 'ipaddress': '*', 'port': 80, 'protocol': 'http', 'sslflags': 0} with patch.dict(win_iis.__salt__): self.assertTrue(win_iis.create_binding(**kwargs))
def test_create_binding(self): ''' Test - Create an IIS binding. ''' kwargs = {'site': 'MyTestSite', 'hostheader': '', 'ipaddress': '*', 'port': 80, 'protocol': 'http', 'sslflags': 0} 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.create_binding(**kwargs))
def test_create_binding(self): """ Test - Create an IIS binding. """ kwargs = { "site": "MyTestSite", "hostheader": "", "ipaddress": "*", "port": 80, "protocol": "http", "sslflags": 0, } 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.create_binding(**kwargs))