def test_subnets(self): """ Test for returns a list of subnets to which the host belongs """ with patch.dict(network.__utils__, {"network.subnets": MagicMock(return_value={})}): self.assertDictEqual(network.subnets(), {})
def test_subnets(self): ''' Test for returns a list of subnets to which the host belongs ''' with patch.object(salt.utils.network, 'subnets', return_value={}): self.assertDictEqual(network.subnets(), {})