properly skip vtwiki tests and, enable calc tests (2^64) was disabled
parent
58d41a0acd
commit
b2add77d08
|
@ -25,12 +25,12 @@ class TestCalc(unittest.TestCase):
|
|||
|
||||
self.phenny.say.assert_called_once_with('2')
|
||||
|
||||
@unittest.skip('Not supported with DuckDuckGo')
|
||||
# @unittest.skip('Not supported with DuckDuckGo')
|
||||
def test_c_scientific(self):
|
||||
input = Mock(group=lambda x: '2^64')
|
||||
c(self.phenny, input)
|
||||
|
||||
self.phenny.say.assert_called_once_with('1.84467441 * 10^(19)')
|
||||
self.phenny.say.assert_called_once_with('1.84467440737096 * 10^19')
|
||||
|
||||
def test_c_none(self):
|
||||
input = Mock(group=lambda x: 'aif')
|
||||
|
|
|
@ -8,32 +8,32 @@ import unittest
|
|||
from mock import MagicMock, Mock
|
||||
from modules import vtluugwiki
|
||||
|
||||
# Disabling tests until wiki is up
|
||||
#class TestVtluugwiki(unittest.TestCase):
|
||||
# def setUp(self):
|
||||
# self.phenny = MagicMock()
|
||||
#
|
||||
# def test_vtluug(self):
|
||||
# input = Mock(groups=lambda: ['', "VT-Wireless"])
|
||||
# vtluugwiki.vtluug(self.phenny, input)
|
||||
#
|
||||
# out = self.phenny.say.call_args[0][0]
|
||||
# m = re.match('^.* - https:\/\/vtluug\.org\/wiki\/VT-Wireless$',
|
||||
# out, flags=re.UNICODE)
|
||||
# self.assertTrue(m)
|
||||
#
|
||||
# def test_vtluug_invalid(self):
|
||||
# term = "EAP-TLS#netcfg"
|
||||
# input = Mock(groups=lambda: ['', term])
|
||||
# vtluugwiki.vtluug(self.phenny, input)
|
||||
#
|
||||
# self.phenny.say.assert_called_once_with( "Can't find anything in "\
|
||||
# "the VTLUUG Wiki for \"{0}\".".format(term))
|
||||
#
|
||||
# def test_vtluug_none(self):
|
||||
# term = "Ajgoajh"
|
||||
# input = Mock(groups=lambda: ['', term])
|
||||
# vtluugwiki.vtluug(self.phenny, input)
|
||||
#
|
||||
# self.phenny.say.assert_called_once_with( "Can't find anything in "\
|
||||
# "the VTLUUG Wiki for \"{0}\".".format(term))
|
||||
@unittest.skip('Skipping until wiki is back up')
|
||||
class TestVtluugwiki(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.phenny = MagicMock()
|
||||
|
||||
def test_vtluug(self):
|
||||
input = Mock(groups=lambda: ['', "VT-Wireless"])
|
||||
vtluugwiki.vtluug(self.phenny, input)
|
||||
|
||||
out = self.phenny.say.call_args[0][0]
|
||||
m = re.match('^.* - https:\/\/vtluug\.org\/wiki\/VT-Wireless$',
|
||||
out, flags=re.UNICODE)
|
||||
self.assertTrue(m)
|
||||
|
||||
def test_vtluug_invalid(self):
|
||||
term = "EAP-TLS#netcfg"
|
||||
input = Mock(groups=lambda: ['', term])
|
||||
vtluugwiki.vtluug(self.phenny, input)
|
||||
|
||||
self.phenny.say.assert_called_once_with( "Can't find anything in "\
|
||||
"the VTLUUG Wiki for \"{0}\".".format(term))
|
||||
|
||||
def test_vtluug_none(self):
|
||||
term = "Ajgoajh"
|
||||
input = Mock(groups=lambda: ['', term])
|
||||
vtluugwiki.vtluug(self.phenny, input)
|
||||
|
||||
self.phenny.say.assert_called_once_with( "Can't find anything in "\
|
||||
"the VTLUUG Wiki for \"{0}\".".format(term))
|
||||
|
|
Loading…
Reference in New Issue