def forecast_txt(zip_code): station_zone = zip_codes.station_zone(zip_code) zone = station_zone[1] url = zip_codes.url(zone) page = request.urlopen(url) txt = [line.decode() for line in page] return txt
def test_station_zone_90210(): assert z.station_zone('90210') == ('ksmo', 'caz547')
def test_station_zone_55057(): assert z.station_zone('55057') == ('ksyn', 'mnz077')
def test_station_zone_20815(): assert z.station_zone('20815') == ('kdca', 'dcz001')