def test_set_dhcp_all(self): ''' Test if it set both IP Address and DNS to DHCP. ''' mock_cmd = MagicMock(return_value=ETHERNET_CONFIG) with patch.dict(win_ip.__salt__, {'cmd.run': mock_cmd}): self.assertDictEqual(win_ip.set_dhcp_all('Ethernet'), {'Interface': 'Ethernet', 'DNS Server': 'DHCP', 'DHCP enabled': 'Yes'})
def test_set_dhcp_all(self): """ Test if it set both IP Address and DNS to DHCP. """ mock_cmd = MagicMock(return_value=ETHERNET_CONFIG) with patch.dict(win_ip.__salt__, {"cmd.run": mock_cmd}): self.assertDictEqual( win_ip.set_dhcp_all("Ethernet"), {"Interface": "Ethernet", "DNS Server": "DHCP", "DHCP enabled": "Yes"} )
def test_set_dhcp_all(self): """ Test if it set both IP Address and DNS to DHCP. """ mock_cmd = MagicMock(return_value=ETHERNET_CONFIG) with patch.dict(win_ip.__salt__, {"cmd.run": mock_cmd}): self.assertDictEqual( win_ip.set_dhcp_all("Ethernet"), { "Interface": "Ethernet", "DNS Server": "DHCP", "DHCP enabled": "Yes" }, )