Fixed a couple test failures.

This commit is contained in:
Jeremy Fincher 2004-11-30 04:49:21 +00:00
parent b1d1991873
commit 01513bcb95
3 changed files with 4 additions and 3 deletions

View File

@ -96,7 +96,7 @@ class Format(callbacks.Privmsg):
Joins all the arguments together with <separator>.
"""
irc.reply(sep.join(args))
join = wrap(join, ['something'], allowExtra=True)
join = wrap(join, ['anything'], allowExtra=True)
def translate(self, irc, msg, args, bad, good, text):
"""<chars to translate> <chars to replace those with> <text>

View File

@ -43,14 +43,14 @@ class BadWordsTestCase(PluginTestCase):
self.assertRegexp('echo %s' % word, '(?!%s)' % word)
self.assertRegexp('echo [colorize %s]' % word, '(?!%s)' % word)
self.assertRegexp('echo foo%sbar' % word, '(?!%s)' % word)
self.assertRegexp('echo [join "" %s]' % ' '.join(word),
self.assertRegexp('echo [format join "" %s]' % ' '.join(word),
'(?!%s)' % word)
def _NegTest(self):
for word in self.badwords:
self.assertRegexp('echo %s' % word, word)
self.assertRegexp('echo foo%sbar' % word, word)
self.assertRegexp('echo [join "" %s]' % ' '.join(word), word)
self.assertRegexp('echo [format join "" %s]' % ' '.join(word),word)
def testAddbadwords(self):
self.assertNotError('badwords add %s' % ' '.join(self.badwords))

View File

@ -50,6 +50,7 @@ class UtilitiesTestCase(PluginTestCase):
def testJoin(self):
self.assertResponse('join + foo bar baz', 'foo+bar+baz')
self.assertResponse('join "" foo bar baz', 'foobarbaz')
def testTranslate(self):
self.assertResponse('translate 123 456 1234567890', '4564567890')