def is_bridge(self, devname: DeviceName) -> bool: return net.is_bridge(devname)
def test_is_bridge(self): """is_bridge is True when /sys/net/devname/bridge exists.""" self.assertFalse(net.is_bridge('eth0')) ensure_file(os.path.join(self.sysdir, 'eth0', 'bridge')) self.assertTrue(net.is_bridge('eth0'))
def test_is_bridge(self): """is_bridge is True when /sys/net/devname/bridge exists.""" self.assertFalse(net.is_bridge('eth0')) ensure_file(os.path.join(self.sysdir, 'eth0', 'bridge')) self.assertTrue(net.is_bridge('eth0'))