File: test_remote.py

package info (click to toggle)
pyroute2 0.8.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,700 kB
  • sloc: python: 50,245; makefile: 280; javascript: 183; ansic: 81; sh: 44; awk: 17
file content (14 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from pr2test.context_manager import skip_if_not_supported

from pyroute2 import IPRoute, RemoteIPRoute


@skip_if_not_supported
def test_links():
    with IPRoute() as ipr:
        links1 = set([x.get_attr('IFLA_IFNAME') for x in ipr.get_links()])

    with RemoteIPRoute() as ipr:
        links2 = set([x.get_attr('IFLA_IFNAME') for x in ipr.get_links()])

    assert links1 == links2