Example #1
0
 def test_ping(self):
     '''
     Test if it performs a ping to a host.
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(win_network.__salt__, {'cmd.run': mock}):
         self.assertTrue(win_network.ping('127.0.0.1'))
Example #2
0
def test_ping():
    """
    Test if it performs a ping to a host.
    """
    mock = MagicMock(return_value=True)
    with patch.dict(win_network.__salt__, {"cmd.run": mock}):
        assert win_network.ping("127.0.0.1")
Example #3
0
 def test_ping(self):
     '''
     Test if it performs a ping to a host.
     '''
     mock = MagicMock(return_value=True)
     with patch.dict(win_network.__salt__, {'cmd.run': mock}):
         self.assertTrue(win_network.ping('127.0.0.1'))