Esempio n. 1
0
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
Esempio n. 2
0
def test_url_mnz077():
	assert z.url('mnz077') == 'http://weather.noaa.gov/pub/data/forecasts/zone/mn/mnz077.txt'
Esempio n. 3
0
def test_url_caz547():
	assert z.url('caz547') == 'http://weather.noaa.gov/pub/data/forecasts/zone/ca/caz547.txt'
Esempio n. 4
0
def test_url_dcz001():
	assert z.url('dcz001') == 'http://weather.noaa.gov/pub/data/forecasts/zone/dc/dcz001.txt'