Don't know exactly why this helps, but there ya go.

This commit is contained in:
Jeremy Fincher 2004-07-31 06:39:41 +00:00
parent 0412055a85
commit 98b7917ffc
1 changed files with 8 additions and 6 deletions

View File

@ -31,9 +31,7 @@
from testsupport import * from testsupport import *
import supybot.conf as conf class AdminTestCase(PluginTestCase):
class AdminTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Admin',) plugins = ('Admin',)
def testChannels(self): def testChannels(self):
def getAfterJoinMessages(): def getAfterJoinMessages():
@ -119,9 +117,13 @@ class AdminTestCase(PluginTestCase, PluginDocumentation):
self.assertEqual(m.args[0], '#foo,#bar') self.assertEqual(m.args[0], '#foo,#bar')
def testNick(self): def testNick(self):
m = self.getMsg('nick foobar') original = conf.supybot.nick()
self.assertEqual(m.command, 'NICK') try:
self.assertEqual(m.args[0], 'foobar') m = self.getMsg('nick foobar')
self.assertEqual(m.command, 'NICK')
self.assertEqual(m.args[0], 'foobar')
finally:
conf.supybot.nick.setValue(original)
def testAddCapabilityOwner(self): def testAddCapabilityOwner(self):
self.assertError('admin addcapability %s owner' % self.nick) self.assertError('admin addcapability %s owner' % self.nick)