def METHOD_NAME(self):
    _getRouteAttrs = lambda x: (x.network, x.via, x.device, x.table)
    good_routes = {
        'default via 192.168.99.254 dev eth0': (
            '0.0.0.0/0',
            '192.168.99.254',
            'eth0',
            None,
        ),
        'default via 192.168.99.254 dev eth0 table foo': (
            '0.0.0.0/0',
            '192.168.99.254',
            'eth0',
            'foo',
        ),
        '200.100.0.0/16 via 11.11.11.11 dev eth2 table foo': (
            '200.100.0.0/16',
            '11.11.11.11',
            'eth2',
            'foo',
        ),
        'local 127.0.0.1 dev lo  src 127.0.0.1': (
            '127.0.0.1',
            None,
            'lo',
            None,
        ),
        'unreachable ::ffff:0.0.0.0/96 dev lo  metric 1024  error -101': (
            '::ffff:0.0.0.0/96',
            None,
            'lo',
            None,
        ),
        'broadcast 240.0.0.255 dev veth_23  table local  '
        'proto kernel  scope link  src 240.0.0.1': (
            '240.0.0.255',
            None,
            'veth_23',
            'local',
        ),
        'ff02::2 dev veth_23  metric 0 \\    cache': (
            'ff02::2',
            None,
            'veth_23',
            None,
        ),
    }
    for text, attributes in good_routes.items():
        route = Route.fromText(text)
        assert _getRouteAttrs(route) == attributes
    bad_routes = [
        'default via 192.168.99.257 dev eth0 table foo',  # Misformed via
        '200.100.50.0/16 dev eth2 table foo extra',  # Key without value
        '288.1.2.9/43 via 1.1.9.4 dev em1 table foo',  # Misformed network
        '200.100.50.0/16 via 192.168.99.254 table foo',  # No device
        'local dev eth0 table bar',
    ]  # local with no address
    for text in bad_routes:
        pytest.raises(ValueError, Route.fromText, text)