remove Midlothian, Virginia weather test; Improve duck_api readibility

master
Paul Walko 2017-02-12 19:06:17 +00:00
parent 71c5f90a5c
commit c8f4da267a
2 changed files with 2 additions and 2 deletions

View File

@ -148,7 +148,8 @@ def duck(phenny, input):
query = input.group(2) query = input.group(2)
if not query: return phenny.reply('.ddg what?') if not query: return phenny.reply('.ddg what?')
uri = duck_api(query) uri = duck_api(query)
if not uri: uri = duck_search(query) if not uri:
uri = duck_search(query)
if uri: if uri:
phenny.reply(uri) phenny.reply(uri)
if not hasattr(phenny.bot, 'last_seen_uri'): if not hasattr(phenny.bot, 'last_seen_uri'):

View File

@ -28,7 +28,6 @@ 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("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")),