def test_in_subnet(self): ''' Test for returns True if host is within specified subnet, otherwise False. ''' with patch.object(salt.utils.network, 'in_subnet', return_value={}): self.assertDictEqual(network.in_subnet('iface'), {})
def test_in_subnet(self): """ Test for returns True if host is within specified subnet, otherwise False. """ with patch.object(salt.utils.network, "in_subnet", return_value={}): self.assertDictEqual(network.in_subnet("iface"), {})
def test_in_subnet(self): """ Test for returns True if host is within specified subnet, otherwise False. """ with patch.dict(network.__utils__, {"network.in_subnet": MagicMock(return_value={})}): self.assertDictEqual(network.in_subnet("iface"), {})