From: Vincent Bernat Date: Fri, 27 May 2016 12:25:45 +0000 (+0200) Subject: tests: fix SONMP test whose result depends on indexes X-Git-Tag: 0.9.4~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7a73629e08bea3a8383e5f4985aac5db33796857;p=thirdparty%2Flldpd.git tests: fix SONMP test whose result depends on indexes --- diff --git a/tests/integration/test_protocols.py b/tests/integration/test_protocols.py index 3704573a..487df8c4 100644 --- a/tests/integration/test_protocols.py +++ b/tests/integration/test_protocols.py @@ -79,5 +79,6 @@ def test_sonmp(lldpd, lldpcli, links, namespaces): assert out["lldp.eth0.via"] == "SONMP" assert out["lldp.eth0.chassis.name"] == "192.168.14.2" assert out["lldp.eth0.chassis.descr"] == "unknown (via SONMP)" - assert out["lldp.eth0.port.local"] == "00-00-02" - assert out["lldp.eth0.port.descr"] == "port 2" + port = out["lldp.eth0.port.local"][-1] + assert out["lldp.eth0.port.local"] == "00-00-0{}".format(port) + assert out["lldp.eth0.port.descr"] == "port {}".format(port)