add tests for factoids.alias

This commit is contained in:
Daniel Folkinshteyn 2010-04-02 00:55:02 -04:00 committed by Valentin Lorentz
parent 50ac5a05e1
commit 9b516480af

View File

@ -170,6 +170,15 @@ class FactoidsTestCase(ChannelPluginTestCase):
conf.supybot.plugins.Factoids.\
replyWhenInvalidCommand.setValue(orig)
def testAlias(self):
self.assertNotError('learn foo as bar')
self.assertNotError('alias foo zoog')
self.assertRegexp('whatis zoog', 'bar')
self.assertNotError('learn foo as snorp')
self.assertError('alias foo gnoop')
self.assertNotError('alias foo gnoop 2')
self.assertRegexp('whatis gnoop', 'snorp')
def testRank(self):
self.assertNotError('learn foo as bar')
self.assertNotError('learn moo as cow')