def test_live(): # run module against live URL # Important: you must register with TFL to use this URL! print "Live Status:" livefeed = urllib2.urlopen("http://cloud.tfl.gov.uk/TrackerNet/LineStatus") livetfl = tflfeed(livefeed) print livetfl.getanyproblems()
def test_static(): # run module against file on disk tfl = tflfeed("LineStatus") print tfl.getdescr("Central") print tfl.getstatusid("Central") print tfl.getanyproblems()