fix some more tests

master
mutantmonkey 2016-03-06 14:55:50 -08:00
parent 24bf71131f
commit 35e7b560ae
3 changed files with 8 additions and 9 deletions

View File

@ -6,7 +6,7 @@ author: mutantmonkey <mutantmonkey@mutantmonkey.in>
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.calc import c, wa from modules.calc import c
class TestCalc(unittest.TestCase): class TestCalc(unittest.TestCase):

View File

@ -13,7 +13,7 @@ class TestHead(unittest.TestCase):
self.phenny = MagicMock() self.phenny = MagicMock()
def test_head(self): def test_head(self):
input = Mock(group=lambda x: 'http://vtluug.org') input = Mock(group=lambda x: 'https://vtluug.org')
head(self.phenny, input) head(self.phenny, input)
out = self.phenny.reply.call_args[0][0] out = self.phenny.reply.call_args[0][0]

View File

@ -23,18 +23,16 @@ class TestWeather(unittest.TestCase):
locations = [ locations = [
('92121', check_places("San Diego", "California")), ('92121', check_places("San Diego", "California")),
('94110', check_places("San Francisco", "California")), ('94110', check_places("SF", "California")),
('94041', check_places("Mountain View", "California")), ('94041', check_places("Mountain View", "California")),
('27959', check_places("Nags Head", "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("Midlothian", "Virginia")),
('27517', check_places("Chapel Hill", "North Carolina")), ('27517', check_places("Chapel Hill", "North Carolina")),
('46530', check_places("Granger", "Indiana")), ('15213', check_places("Allegheny County", "Pennsylvania")),
('15213', check_places("Pittsburgh", "Pennsylvania")), ('90210', check_places("Los Angeles County", "California")),
('90210', check_places("Beverly Hills", "California")), ('33109', check_places("Miami-Dade County", "Florida")),
('12144', check_places("Clinton Park", "New York")),
('33109', check_places("Homestead", "Florida")),
('80201', check_places("Denver", "Colorado")), ('80201', check_places("Denver", "Colorado")),
("Berlin", check_places("Berlin", "Deutschland")), ("Berlin", check_places("Berlin", "Deutschland")),
@ -42,6 +40,7 @@ class TestWeather(unittest.TestCase):
("Vilnius", check_places("Vilnius", "Lietuva")), ("Vilnius", check_places("Vilnius", "Lietuva")),
('Blacksburg, VA', check_places("Blacksburg", "Virginia")), ('Blacksburg, VA', check_places("Blacksburg", "Virginia")),
('Granger, IN', check_places("Granger", "Indiana")),
] ]
for loc, validator in locations: for loc, validator in locations: