def call_urls(self, url_list): for u in url_list: #import pdb; pdb.set_trace() itinerary = Test.static_call_otp(u) print u if itinerary: if len(itinerary) < 1000: error_descript = "test_otp_result: itinerary content looks small at " + str(len(itinerary)) + " characters." print error_descript if "Uncertain Location" in itinerary: error_descript = "test_otp_result: itinerary had ambiguous geocode" print error_descript else: print "Planner didn't return anything (null)..."
def call_urls(self, url_list): for u in url_list: #import pdb; pdb.set_trace() itinerary = Test.static_call_otp(u) print u if itinerary: if len(itinerary) < 1000: error_descript = "test_otp_result: itinerary content looks small at " + str( len(itinerary)) + " characters." print error_descript if "Uncertain Location" in itinerary: error_descript = "test_otp_result: itinerary had ambiguous geocode" print error_descript else: print "Planner didn't return anything (null)..."
def otp_trips(): h = Test.make_hostname() p, m = Test.make_urls(h) rt = RandomTrip() rt.make_tests(p) rt.call_urls()
def zws_trips(): s = Test.static_call_otp( "http://maps7.trimet.org/maps/tpws/V1/trips/tripplanner?fromPlace=6236%20SE%20134TH%20AVE&toPlace=9341%20N%20FISKE%20AVE" )
def otp_trips(): h = Test.make_hostname() p,m = Test.make_urls(h) rt = RandomTrip() rt.make_tests(p) rt.call_urls()
def zws_trips(): s = Test.static_call_otp("http://maps7.trimet.org/maps/tpws/V1/trips/tripplanner?fromPlace=6236%20SE%20134TH%20AVE&toPlace=9341%20N%20FISKE%20AVE")