mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Bugfixes and a test.
This commit is contained in:
parent
74763d4dec
commit
e138211f9b
@ -504,6 +504,9 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
||||
if irc.nick in self.registryValue('nicks'):
|
||||
self._doIdentify(irc, irc.nick)
|
||||
irc.replySuccess()
|
||||
else:
|
||||
irc.error('I don\'t have a configured password for '
|
||||
'my current nick.')
|
||||
else:
|
||||
irc.error('You must set supybot.plugins.Services.NickServ before '
|
||||
'I\'m able to do identify.')
|
||||
|
@ -31,8 +31,24 @@
|
||||
|
||||
from testsupport import *
|
||||
|
||||
class ServicesTestCase(PluginTestCase, PluginDocumentation):
|
||||
class ServicesTestCase(PluginTestCase):
|
||||
plugins = ('Services',)
|
||||
config = {
|
||||
'plugins.Services.NickServ': 'NickServ',
|
||||
'plugins.Services.ChanServ': 'ChanServ',
|
||||
}
|
||||
|
||||
def testPasswordAndIdentify(self):
|
||||
self.assertNotError('services password foo bar')
|
||||
self.assertError('services identify') # Don't have a password.
|
||||
self.assertNotError('services password %s baz' % self.nick)
|
||||
m = self.assertNotError('services identify')
|
||||
self.failUnless(m.args[0] == 'NickServ')
|
||||
self.failUnless(m.args[1].lower() == 'identify baz')
|
||||
self.assertNotError('services password %s biff' % self.nick)
|
||||
m = self.assertNotError('services identify')
|
||||
self.failUnless(m.args[0] == 'NickServ')
|
||||
self.failUnless(m.args[1].lower() == 'identify biff')
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
Loading…
Reference in New Issue
Block a user