def test_get_interface_mac(self):
    expect_val = '01:02:03:04:05:06'
    with mock.patch('fcntl.ioctl') as ioctl:
        ioctl.return_value = ''.join([('\x00' * 18), '\x01\x02\x03\x04\x05\x06', ('\x00' * 232)])
        actual_val = utils.get_interface_mac('eth0')
    self.assertEqual(actual_val, expect_val)
def test_get_interface_mac(self):
    expect_val = '01:02:03:04:05:06'
    with mock.patch('fcntl.ioctl') as ioctl:
        ioctl.return_value = .join([('\x00' * 18), '\x01\x02\x03\x04\x05\x06', ('\x00' * 232)])
        actual_val = utils.get_interface_mac('eth0')
    self.assertEqual(actual_val, expect_val)