Fixed the tests.
parent
b9f0da7d74
commit
9248b6721c
|
@ -42,13 +42,22 @@ class TestTfw(unittest.TestCase):
|
||||||
|
|
||||||
def test_mev(self):
|
def test_mev(self):
|
||||||
input = Mock(group=lambda x: '24060')
|
input = Mock(group=lambda x: '24060')
|
||||||
tfw.tfw(self.phenny, input)
|
tfw.tfweV(self.phenny, input)
|
||||||
|
|
||||||
out = self.phenny.say.call_args[0][0]
|
out = self.phenny.say.call_args[0][0]
|
||||||
m = re.match('^[\-\d\.]+ meV‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out,
|
m = re.match('^[\-\d\.]+ meV‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out,
|
||||||
flags=re.UNICODE)
|
flags=re.UNICODE)
|
||||||
self.assertTrue(m)
|
self.assertTrue(m)
|
||||||
|
|
||||||
|
def test_meter(self):
|
||||||
|
input = Mock(group=lambda x: '24060')
|
||||||
|
tfw.tfw(self.phenny, input)
|
||||||
|
|
||||||
|
out = self.phenny.say.call_args[0][0]
|
||||||
|
m = re.match('^[\-\d\.]+ Meters‽ .* \- .* \- [A-Z]{4} \d{2}:\d{2}Z$', out,
|
||||||
|
flags=re.UNICODE)
|
||||||
|
self.assertTrue(m)
|
||||||
|
|
||||||
def test_sexy_time(self):
|
def test_sexy_time(self):
|
||||||
input = Mock(group=lambda x: 'KBCB')
|
input = Mock(group=lambda x: 'KBCB')
|
||||||
tfw.web = MagicMock()
|
tfw.web = MagicMock()
|
||||||
|
|
Loading…
Reference in New Issue