def test_dig(self): ''' Test if it performs a DNS lookup with dig ''' mock = MagicMock(return_value=True) with patch.dict(win_network.__salt__, {'cmd.run': mock}): self.assertTrue(win_network.dig('google.com'))
def test_dig(): """ Test if it performs a DNS lookup with dig """ mock = MagicMock(return_value=True) with patch.dict(win_network.__salt__, {"cmd.run": mock}): assert win_network.dig("google.com")