コード例 #1
0
 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')
コード例 #2
0
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"
コード例 #3
0
ファイル: win_network_test.py プロジェクト: dmyerscough/salt
 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')