isis-topo1: simplify dictionary key removal code

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2017-12-20 10:07:31 -02:00 committed by Donald Sharp
parent 88f83773d9
commit d43cd0fd62

View File

@ -165,15 +165,8 @@ def test_isis_route_installation():
continue
for nexthop in route['nexthops']:
try:
nexthop.pop('interfaceIndex')
except KeyError:
pass
try:
nexthop.pop('interfaceName')
except KeyError:
pass
nexthop.pop('interfaceIndex', None)
nexthop.pop('interfaceName', None)
assertmsg = "Router '{}' routes mismatch".format(rname)
assert topotest.json_cmp(actual, expected) is None, assertmsg