def test_hw_addr(self): ''' Test if it return the hardware address (a.k.a. MAC address) for a given interface ''' with patch.object(salt.utils.network, 'hw_addr', MagicMock(return_value='Ethernet')): self.assertEqual(win_network.hw_addr('Ethernet'), 'Ethernet')
def test_hw_addr(): """ Test if it return the hardware address (a.k.a. MAC address) for a given interface """ with patch.object(salt.utils.network, "hw_addr", MagicMock(return_value="Ethernet")): assert win_network.hw_addr("Ethernet") == "Ethernet"