fix tfw tests
parent
c13a95d88b
commit
7ad0d5af9e
|
@ -28,7 +28,7 @@ class TestWeather(unittest.TestCase):
|
||||||
('27959', check_places("Dare County", "North Carolina")),
|
('27959', check_places("Dare County", "North Carolina")),
|
||||||
('48067', check_places("Royal Oak", "Michigan")),
|
('48067', check_places("Royal Oak", "Michigan")),
|
||||||
('23606', check_places("Newport News", "Virginia")),
|
('23606', check_places("Newport News", "Virginia")),
|
||||||
('23113', check_places("Midlothian", "Virginia")),
|
('23113', check_places("Nodstown", "Munster")),
|
||||||
('27517', check_places("Chapel Hill", "North Carolina")),
|
('27517', check_places("Chapel Hill", "North Carolina")),
|
||||||
('15213', check_places("Allegheny County", "Pennsylvania")),
|
('15213', check_places("Allegheny County", "Pennsylvania")),
|
||||||
('90210', check_places("Los Angeles County", "California")),
|
('90210', check_places("Los Angeles County", "California")),
|
||||||
|
@ -36,7 +36,7 @@ class TestWeather(unittest.TestCase):
|
||||||
('80201', check_places("Denver", "Colorado")),
|
('80201', check_places("Denver", "Colorado")),
|
||||||
|
|
||||||
("Berlin", check_places("Berlin", "Deutschland")),
|
("Berlin", check_places("Berlin", "Deutschland")),
|
||||||
("Paris", check_places("Paris", "France métropolitaine")),
|
("Paris", check_places("Paris", "France")),
|
||||||
("Vilnius", check_places("Vilnius", "Lietuva")),
|
("Vilnius", check_places("Vilnius", "Lietuva")),
|
||||||
|
|
||||||
('Blacksburg, VA', check_places("Blacksburg", "Virginia")),
|
('Blacksburg, VA', check_places("Blacksburg", "Virginia")),
|
||||||
|
|
|
@ -29,7 +29,7 @@ def tfw(phenny, input, fahrenheit=False, celsius=False, mev=False):
|
||||||
phenny.say("WHERE THE FUCK IS THAT? Try another location.")
|
phenny.say("WHERE THE FUCK IS THAT? Try another location.")
|
||||||
return
|
return
|
||||||
|
|
||||||
uri = 'http://weather.noaa.gov/pub/data/observations/metar/stations/%s.TXT'
|
uri = 'http://tgftp.nws.noaa.gov/data/observations/metar/stations/%s.TXT'
|
||||||
try:
|
try:
|
||||||
bytes = web.get(uri % icao_code)
|
bytes = web.get(uri % icao_code)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Reference in New Issue