Exemple #1
0
 def test_set_dhcp_dns(self):
     """
     Test if it set DNS source to DHCP on Windows.
     """
     mock_cmd = MagicMock(return_value=ETHERNET_CONFIG)
     with patch.dict(win_ip.__salt__, {"cmd.run": mock_cmd}):
         self.assertDictEqual(win_ip.set_dhcp_dns("Ethernet"), {"DNS Server": "DHCP", "Interface": "Ethernet"})
Exemple #2
0
 def test_set_dhcp_dns(self):
     '''
     Test if it set DNS source to DHCP on Windows.
     '''
     mock_cmd = MagicMock(return_value=ETHERNET_CONFIG)
     with patch.dict(win_ip.__salt__, {'cmd.run': mock_cmd}):
         self.assertDictEqual(win_ip.set_dhcp_dns('Ethernet'),
                              {'DNS Server': 'DHCP',
                               'Interface': 'Ethernet'})
 def test_set_dhcp_dns(self):
     """
     Test if it set DNS source to DHCP on Windows.
     """
     mock_cmd = MagicMock(return_value=ETHERNET_CONFIG)
     with patch.dict(win_ip.__salt__, {"cmd.run": mock_cmd}):
         self.assertDictEqual(
             win_ip.set_dhcp_dns("Ethernet"),
             {
                 "DNS Server": "DHCP",
                 "Interface": "Ethernet"
             },
         )