Anonymous: Use assertEqual in tests instead of failUnless(... == ...).

This commit is contained in:
Valentin Lorentz 2013-04-22 17:46:35 +00:00
parent 6b1131bff9
commit 96fae12fd2

View File

@ -40,10 +40,10 @@ class AnonymousTestCase(ChannelPluginTestCase):
try:
conf.supybot.plugins.Anonymous.requireRegistration.setValue(False)
m = self.assertNotError('anonymous say %s foo!' % self.channel)
self.failUnless(m.args[1] == 'foo!')
self.assertEqual(m.args[1], 'foo!')
conf.supybot.plugins.Anonymous.allowPrivateTarget.setValue(True)
m = self.assertNotError('anonymous say %s foo!' % self.nick)
self.failUnless(m.args[1] == 'foo!')
self.assertEqual(m.args[1], 'foo!')
finally:
conf.supybot.plugins.Anonymous.requireRegistration.setValue(origreg)
conf.supybot.plugins.Anonymous.allowPrivateTarget.setValue(origpriv)