Ejemplo n.º 1
0
 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'})
Ejemplo n.º 2
0
 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"}
         )
Ejemplo n.º 3
0
 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"
             },
         )