mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Fixed a couple test failures.
This commit is contained in:
parent
b1d1991873
commit
01513bcb95
@ -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>
|
||||
|
@ -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))
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user