def test_path_add(self, addr, path, nh, new_as): ipaddr = ipaddress.ip_network(addr) route = Route(ipaddr, path, nh) route.add_to_path(new_as) path.insert(0, new_as) assert route.path == path