def test_set_dhcp_ip(self): """ Test if it set Windows NIC to get IP from DHCP. """ mock_cmd = MagicMock(return_value=ETHERNET_CONFIG) with patch.dict(win_ip.__salt__, {"cmd.run": mock_cmd}): self.assertDictEqual(win_ip.set_dhcp_ip("Ethernet"), {"DHCP enabled": "Yes", "Interface": "Ethernet"})
def test_set_dhcp_ip(self): ''' Test if it set Windows NIC to get IP from DHCP. ''' mock_cmd = MagicMock(return_value=ETHERNET_CONFIG) with patch.dict(win_ip.__salt__, {'cmd.run': mock_cmd}): self.assertDictEqual(win_ip.set_dhcp_ip('Ethernet'), {'DHCP enabled': 'Yes', 'Interface': 'Ethernet'})
def test_set_dhcp_ip(self): """ Test if it set Windows NIC to get IP from DHCP. """ mock_cmd = MagicMock(return_value=ETHERNET_CONFIG) with patch.dict(win_ip.__salt__, {"cmd.run": mock_cmd}): self.assertDictEqual( win_ip.set_dhcp_ip("Ethernet"), { "DHCP enabled": "Yes", "Interface": "Ethernet" }, )