Exemplo n.º 1
0
 def test_get_default_gateway(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.assertEqual(win_ip.get_default_gateway(), '1.2.3.1')
Exemplo n.º 2
0
 def test_get_default_gateway(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.assertEqual(win_ip.get_default_gateway(), "1.2.3.1")