mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Added test for unregister.
This commit is contained in:
parent
ce293a32cc
commit
f4d7b28a95
@ -31,14 +31,20 @@
|
||||
|
||||
from test import *
|
||||
|
||||
import ircdb
|
||||
|
||||
class UserCommandsTestCase(PluginTestCase, PluginDocumentation):
|
||||
plugins = ('UserCommands',)
|
||||
prefix1 = 'somethingElse!user@host.tld'
|
||||
prefix2 = 'EvensomethingElse!user@host.tld'
|
||||
def testRegister(self):
|
||||
def testRegisterUnregister(self):
|
||||
self.prefix = self.prefix1
|
||||
self.assertNotError('register foo bar')
|
||||
self.assertError('register foo baz')
|
||||
self.failUnless(ircdb.users.getUserId('foo'))
|
||||
self.assertNotError('unregister foo bar')
|
||||
self.assertRaises(KeyError, ircdb.users.getUserId, 'foo')
|
||||
|
||||
|
||||
def testChangeUsername(self):
|
||||
self.prefix = self.prefix1
|
||||
|
Loading…
Reference in New Issue
Block a user