def check_route(self, route_string, route_hops): """Check from string to hops and back again""" hops = SAPRouterRouteHop.from_string(route_string) self.assertListEqual(hops, route_hops) string = SAPRouterRouteHop.from_hops(hops) self.assertEqual(string, route_string)
def check_route(self, route_string, route_hops): """Check from string to hops and back again""" hops = SAPRouterRouteHop.from_string(route_string) self.assertListEqual(hops, route_hops) string = SAPRouterRouteHop.from_hops(hops) route_string = route_string.replace("/h/", "/H/").replace("/s/", "/S/").replace("/p/", "/P/").replace("/w/", "/W/") self.assertEqual(string, route_string)